: Should i disallow my mobile url's via robots.txt? I'm trying to code my sites mobile version. it will be like this: www.example.com => mobile.example.com im using this alternate tag in desktop
I'm trying to code my sites mobile version. it will be like this: example.com => mobile.example.com
im using this alternate tag in desktop page; thats ok:
<link rel="alternate" media="only screen and (max-width: 800px)"
href="http://mobile.example.com/first_link.html">
and using this canonical tag in mobile version; thats ok too:
<link rel="canonical" href="http://www.example.com/first_link.html" />
now.. should i also ban the mobile pages via robots.txt file? (by adding robots.txt file to the root of mobile directory; with Disallow: / line)
because if not, google will index both and mobile. url's.. (all contents are the same; the only difference is: design)...
what sould i do? using canonical/alternate tags will be enough to no-indexing? or should i also use robots.txt to disallow mobile directory?
More posts by @Ravi8258870
1 Comments
Sorted by latest first Latest Oldest Best
The canonical tag is enough, as it lets Google know which page should be indexed. It is basically a way of saying "Hey, these pages are extremely similar. Here is the page that should take precedence."
Preventing Google from crawling your mobile links will cause more harm than good. Example: If a mobile user shares a mobile link to your website, you don't want to be caught in a situation where Googlebot can't crawl that link.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.