{"id":74,"date":"2019-09-10T02:45:20","date_gmt":"2019-09-10T06:45:20","guid":{"rendered":"https:\/\/synetech.ddns.net\/blogs\/synetech\/?p=74"},"modified":"2020-04-24T16:40:37","modified_gmt":"2020-04-24T20:40:37","slug":"unmobilesearch","status":"publish","type":"post","link":"https:\/\/synetech.ddns.net\/blogs\/synetech\/unmobilesearch\/","title":{"rendered":"UnMobileSearch &#8211; Stop search-engines from linking to mobile versions of sites"},"content":{"rendered":"<h1>UnMobileSearch user-script<\/h1>\n<h2>Purpose<\/h2>\n<p><tt style=\"font-size:12px; line-height:1em; display:block;\"><br \/>\nAs more and more people use mobile devices (i.e. phones, but also tablets) to browse the Internet<br \/>\nmobile versions of websites get used more and more, and since people will usually end up viewing<br \/>\nthe mobile version of sites after doing a web-search, the mobile versions of sites have bubbled<br \/>\nup in search-engine results to surpass the non-mobile versions of those same sites. So now, if<br \/>\nyou do a web-search you may get links to mobile versions of sites instead of non-mobile URLS.<br \/>\nThere isn't really a way to stop this in your system or even in the search-engine as there's<br \/>\nno standardized method of a site to indicate its mobile version (many use a m. sub-domain),<br \/>\nbut that is not necessarily universal. This user-script will detect results pages from any<br \/>\nsearch-engines it currently supports and try to switch any links to non-mobile versions.\u263a<br \/>\n<\/tt><\/p>\n<h2>Notes:<\/h2>\n<ul>\n<li>Mobile versions of sites aren&#8217;t standardized, so will have to accommodate site-by-site<\/li>\n<li>Currently supported search-engines:\n<ul>\n<li>DuckDuckGo<\/li>\n<li>NOT Google, and probably won&#8217;t for the foreseeable future because Google is evil \ud83d\ude12<\/li>\n<\/ul>\n<\/li>\n<li>Currently supports mobile URLs of the form <code>X.*<\/code> and <code>*.X.*<\/code> (where X is <code>m<\/code> or <code>mobile<\/code>)<\/li>\n<li>Catches <code>m.<\/code>\/<code>mobile.<\/code> anywhere in the domain: <code>foo.bar.m.baz.example.com<\/code> \u2192 <code>foo.bar.baz.example.com<\/code><\/li>\n<li>Only one instance of <code>m.<\/code>\/<code>mobile.<\/code> is removed: <code>a.m.b.m.c.com<\/code> \u2192 <code>a.b.m.c.com<\/code><\/li>\n<li>You\u2019ll need a browser-extension like <a href=\"https:\/\/tampermonkey.net\/\" rel=\"noopener noreferrer\" target=\"_blank\">TamperMonkey<\/a>, <a href=\"https:\/\/violentmonkey.github.io\/get-it\/\" rel=\"noopener noreferrer\" target=\"_blank\">ViolentMonkey<\/a>, or <a href=\"https:\/\/www.greasespot.net\/\" rel=\"noopener noreferrer\" target=\"_blank\">GreaseMonkey<\/a> in order to use it<\/li>\n<li>Sometimes the search results will actually return the mobile and non-mobile versions of a page, in this case, you&#8217;ll end up with two links to the non-mobile version<\/li>\n<\/ul>\n<h2>Download<\/h2>\n<p><a href=\"\/synetech\/UnMobileSearch.user.js\" title=\"UnMobileSearch user-script download\">UnMobileSearch 3<\/a><\/p>\n<h2>Screenshots<\/h2>\n<figure id=\"attachment_76\" class=\"thumbnail wp-caption alignleft\" style=\"width: 226px\"><a href=\"\/blogs\/synetech\/files\/2019\/09\/UnMobileSearchOff.png\"><img loading=\"lazy\" decoding=\"async\" src=\"\/blogs\/synetech\/files\/2019\/09\/UnMobileSearchOff-216x300.png\" alt=\"DuckDuckGo search results linking to mobile versions of sites\" width=\"216\" height=\"300\" class=\"size-medium wp-image-76\" srcset=\"https:\/\/synetech.ddns.net\/blogs\/synetech\/files\/2019\/09\/UnMobileSearchOff-216x300.png 216w, https:\/\/synetech.ddns.net\/blogs\/synetech\/files\/2019\/09\/UnMobileSearchOff.png 560w\" sizes=\"auto, (max-width: 216px) 100vw, 216px\" \/><\/a><figcaption class=\"caption wp-caption-text\">DuckDuckGo search results linking to mobile versions of sites<\/figcaption><\/figure>\n<figure id=\"attachment_77\" class=\"thumbnail wp-caption alignleft\" style=\"width: 226px\"><a href=\"\/blogs\/synetech\/files\/2019\/09\/UnMobileSearchOn.png\"><img loading=\"lazy\" decoding=\"async\" src=\"\/blogs\/synetech\/files\/2019\/09\/UnMobileSearchOn-216x300.png\" alt=\"DuckDuckGo search results linking to non-mobile versions of sites\" width=\"216\" height=\"300\" class=\"size-medium wp-image-77\" srcset=\"https:\/\/synetech.ddns.net\/blogs\/synetech\/files\/2019\/09\/UnMobileSearchOn-216x300.png 216w, https:\/\/synetech.ddns.net\/blogs\/synetech\/files\/2019\/09\/UnMobileSearchOn.png 560w\" sizes=\"auto, (max-width: 216px) 100vw, 216px\" \/><\/a><figcaption class=\"caption wp-caption-text\">DuckDuckGo search results linking to non-mobile versions of sites<\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>UnMobileSearch user-script Purpose As more and more people use mobile devices (i.e. phones, but also tablets) to browse the Internet mobile versions of websites get used more and more, and since people will usually end up viewing the mobile version of sites after doing a web-search, the mobile versions of sites have bubbled up in [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-74","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/synetech.ddns.net\/blogs\/synetech\/wp-json\/wp\/v2\/posts\/74","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/synetech.ddns.net\/blogs\/synetech\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/synetech.ddns.net\/blogs\/synetech\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/synetech.ddns.net\/blogs\/synetech\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/synetech.ddns.net\/blogs\/synetech\/wp-json\/wp\/v2\/comments?post=74"}],"version-history":[{"count":0,"href":"https:\/\/synetech.ddns.net\/blogs\/synetech\/wp-json\/wp\/v2\/posts\/74\/revisions"}],"wp:attachment":[{"href":"https:\/\/synetech.ddns.net\/blogs\/synetech\/wp-json\/wp\/v2\/media?parent=74"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/synetech.ddns.net\/blogs\/synetech\/wp-json\/wp\/v2\/categories?post=74"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/synetech.ddns.net\/blogs\/synetech\/wp-json\/wp\/v2\/tags?post=74"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}