About robots.txt

If you want the search engines to index everything in your site, you actually don't need this file. However, you only need a robots.txt file if you want to exclude access to any content that you don't want search engines to index.

A basic understanding of what this file does is all you need at this stage, so we'll cover just a few of the more important scenarios that you may encounter or wish to put in place.

The Job of robots.txt

This important file controls access to the pages/posts on your website.

As the automated search engine robots crawl the web, and before they access your site, they first look to see whether arobots.txt file exists that prevents them from accessing certain pages.

If you do nothing to this file or just leave it alone, the bots will continue to your website and search everything without restriction. On most sites this is exactly what you want, but there are times when you may need to restrict access to some areas of the server.

If you notice problems with bad links, or blocked URLs that Google hasn't been able to crawl, go to your Google Webmaster Tools and look at Blocked URLs in the Crawl section to have a look!



Join the Discussion
Write something…
Recent messages
shazman Premium
Hello there - I would like to know if disallowing wp-admin is still required? As per https://yoast.com/wordpress-robots-txt-example/ we are told it should be allowed. My website is marriedbuthappy.com and I have nothing to hide from Google other than posts like privacy policy, about me etc. What should I do?
Reply
EKautz Premium
The only thing I set to no crawl was privacy and about pages. I left everything else open to being crawled.

ROCK ON!
E
Reply
shazman Premium
Thanks EKautz! So how would my robots file look like then if I were to do the same? Currently it looks like this:
User-agent: *
Disallow: /wp-admin/

Google is blocking lots of pages though due to this and has identified wp-admin as the culprit. I just want to have privacy and about pages set to no crawl.
Reply
EKautz Premium
You're welcome.

Are you sure Google is blocking the pages for this reason? Also if you don't have the pages crawled then the pages won't rank so it is counter-productive.
Reply
acoolmil Premium
Impressive Rob.
Reply
Trialynn Premium
You did a great job Rob, thanks!
Reply
cybridge Premium
Nice JOB!
Reply
Bill67 Premium
thanks for the heads up Rob. Nicely done.
Reply
KD6PAO Premium
Nice job Rob! After what I went through the other day this makes perfect sense to me!
Reply
rob3 Premium
Thanks, thought I'd elaborate to cover wider scenarios!
Reply
Top