How to Disallow for Index Mobile Version ?

SEO Help and Tips

How to Disallow for Index Mobile Version ?

User-Agent: Googlebot-Mobile
Disallow: /

User-Agent: Googlebot
Disallow: /example-directory/

In the above robots.txt file:

The first set of rules applies to Googlebot-Mobile, the crawler for smartphones. It disallows crawling of the entire website (Disallow: /), meaning that no pages will be crawled or indexed by Googlebot-Mobile.

The second set of rules applies to the standard Googlebot, the crawler for desktop and other devices. It disallows crawling of the "/example-directory/" and its subdirectories, meaning that the contents of the "example-directory" will not be crawled or indexed by Googlebot (desktop version).

User-Agent: Googlebot:

The line User-Agent: Googlebot specifies that the following rules apply specifically to the Googlebot, which is the web crawler used by Google to index webpages.
Disallow: /example-directory/:

The line Disallow: /example-directory/ instructs Googlebot not to crawl or index any content under the "/example-directory/" and its subdirectories.

For example, if you have URLs like:
https://example.com/example-directory/page1
https://example.com/example-directory/page2

Googlebot will not crawl or index these pages because they fall under the "/example-directory/".

Remember to upload this robots.txt file to the root directory of your website so that search engines can find and follow the rules accordingly. It's essential to carefully review your robots.txt file to avoid any unintended blocking of content you want to be indexed by search engines. Additionally, keep in mind that robots.txt is a public document, and its rules are visible to anyone, so avoid using it to block sensitive or private information.

Comments

Popular posts from this blog

Office Tool_SPSS v23 + Serial key

How to Fix FATAL error Failed to parse input Document ?

How to Reduce Lazy Load Resources

Popular posts from this blog

Office Tool_SPSS v23 + Serial key

How to Fix FATAL error Failed to parse input Document ?

How to Reduce Lazy Load Resources