Mobile app version of vmapp.org
Login or Join
Ravi8258870

: 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

@Ravi8258870

Posted in: #CanonicalUrl #GooglebotMobile #Mobile #RelCanonical

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?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Ravi8258870

1 Comments

Sorted by latest first Latest Oldest Best

 

@Cody1181609

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.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme