Wondering what is the use of Robots.txt file in a website? I have seen a lot of confusions related to robots.txt file, and this creates SEO issues on your website. In this article, I will share everything you need to know about robots.txt file, and also I will share some links which will help you to dive deep into this topic.If you browse Google Webmaster forum, you will see FAQ like:
- Why is Google not de-indexing certain part of my blog, where I have added Noindex tag?
- Why is my blog crawl rate slow?
- Why are my deep links not getting indexed?
- Why is Google indexing my admin folders?
Be it WordPress, Drupal or any other platform, Robots.txt is a universal standard for websites, and it resides at the root of a domain. For example; domain.com/Robots.txt
Now, you must be wondering, what’s Robots.txt file, how to create one, and how to use it for search engine optimization? We have already covered few of the questions here, and here you will learn about the tech-side of robots.txt file.
What is the use of Robots.txt file on a Website?
Let me start from the basics, all the search engines have bots to crawl a website. Crawling and indexing are two different terms, and if you wish to get in-depth about it, you can read: Google Crawling and indexing. When a search engine bot (Google bot, Bing bot, 3rd party search engine crawlers), come to your site following a link or following site map link submitted in webmaster dashboard, they follow all the links on your blog to crawl and index your site.
Now, these two files Sitemap.xml and Robots.txt, resides at the root of your domain. As I mentioned, bots follow robots.txt rules, to determine the crawling of your website. Here is the usage of robots.txt file:
When a search engine bots come on your blog, they have limited resources to crawl your site. If they can’t crawl all the pages on your Website in given resources, they will stop crawling, and this will hamper your indexing. Now, at the same time, there are many parts of your website, that you don’t want search engine bots to crawl. For example, your Wp-admin folder, your admin dashboard or other pages, which are not useful for search engines. Using robots.txt, you are directing search engine crawlers (bots), to not to crawl such area of your website. This will not only speed up crawling of your blog but will also help in deep crawling of your inner pages.
The biggest misconception about Robots.txt file is that people use it for Noindexing. Do remember, Robots.txt file is not for Doindex or Noindex, it’s just to direct search engine bots to stop crawling certain part of your blog. For example, if you look at ShoutMeLoud Robots.txt file (WordPress platform), you will clearly understand, what part of my blog I don’t want search engine bots to crawl.
How to check your Robots.txt file?
As I mentioned, Robots.txt file resides at the root of your domain. You can check your domain robots.txt file at www.domain.com/robots.txt. In most of the cases ( especially in WordPress platform), you will see a blank robots.txt file. You can also check your domain Robots.txt file using GWT by going to Google webmaster tool > Under site configuration> Crawler Access
The basic structure of your robots.txt to avoid duplicate content should be something like this
This will prevent robots to crawl your admin folder followed by feeds, trackbacks, comment feeds, pages, and comments. Do remember, Robots file only stops crawling but doesn’t prevent indexing. Google uses Noindex tag for not indexing any posts or page of your blog. You can use WordPress SEO by yoast to add Noindex in any individual posts or a part of your blog. For effective SEO of your domain, Website, blog , I suggest you keep your category, tags pages as Noindex but dofollow.
- Robots.txt file is just used to stop crawling certain part of your blog.
- Robots.txt file should not be used for Noindexing instead, Noindex meta tag should be used.
Note: If you are trying to de-index certain part of your blog, which is already indexed, don’t use Robots.txt to block access to that part. This will prevent bots to crawl that part of your blog, and see the updated Noindex tag. For ex: replytocom issue.
Update: An updated version of this topic along with more information can be found here: Optimize WordPress Robots.txt for SEO