Table of Contents
Googlebot is Google’s web crawling bot (sometimes also called a “spider”). Crawling is the process by which Googlebot discovers new and updated pages to be added to the Google index.
We use a huge set of computers to fetch (or “crawl”) billions of pages on the web. Googlebot uses an algorithmic process: computer programs determine which sites to crawl, how often, and how many pages to fetch from each site.
Googlebot’s crawl process begins with a list of webpage URLs, generated from previous crawl processes and augmented with Sitemap data provided by webmasters. As Googlebot visits each of these websites it detects links (SRC and HREF) on each page and adds them to its list of pages to crawl. New sites, changes to existing sites, and dead links are noted and used to update the Google index.
For webmasters: Googlebot and your site
How Googlebot accesses your site
For most sites, Googlebot shouldn’t access your site more than once every few seconds on average. However, due to network delays, it’s possible that the rate will appear to be slightly higher over short periods.
Googlebot was designed to be distributed on several machines to improve performance and scale as the web grows. Also, to cut down on bandwidth usage, we run many crawlers on machines located near the sites they’re indexing in the network. Therefore, your logs may show visits from several machines at google.com, all with the user-agent Googlebot. Our goal is to crawl as many pages from your site as we can on each visit without overwhelming your server’s bandwidth. Request a change in the crawl rate.
Blocking Googlebot from content on your site
It’s almost impossible to keep a web server secret by not publishing links to it. As soon as someone follows a link from your “secret” server to another web server, your “secret” URL may appear in the referrer tag and can be stored and published by the other web server in its referrer log. Similarly, the web has many outdated and broken links. Whenever someone publishes an incorrect link to your site or fails to update links to reflect changes in your server, Googlebot will try to download an incorrect link from your site.
Once you’ve created your robots.txt file, there may be a small delay before Googlebot discovers your changes. If Googlebot is still crawling content you’ve blocked in robots.txt, check that the robots.txt is in the correct location. It must be in the top directory of the server (for example, www.example.com/robots.txt); placing the file in a subdirectory won’t have any effect.
If you just want to prevent the “file not found” error messages in your web server log, you can create an empty file named robots.txt. If you want to prevent Googlebot from following any links on a page of your site, you can use the nofollow meta tag. To prevent Googlebot from following an individual link, add the
rel="nofollow" attribute to the link itself.
Here are some additional tips:
- Test that your robots.txt is working as expected. The Test robots.txt tool on the Blocked URLs page lets you see exactly how Googlebot will interpret the contents of your robots.txt file. The Google user-agent is (appropriately enough)
- The Fetch as Google tool in Search Console helps you understand exactly how your site appears to Googlebot. This can be very useful when troubleshooting problems with your site’s content or discoverability in search results.
Making sure your site is crawlable
Googlebot discovers sites by following links from page to page. The Crawl errors page in Search Console lists any problems Googlebot found when crawling your site. We recommend reviewing these crawl errors regularly to identify any problems with your site.
If your robots.txt file is working as expected, but your site isn’t getting traffic, here are some possible reasons why your content is not performing well in search.
Problems with spammers and other user-agents
The IP addresses used by Googlebot change from time to time. The best way to identify accesses by Googlebot is to use the user-agent (Googlebot). You can verify that a bot accessing your server really is Googlebot by using a reverse DNS lookup.
Googlebot and all respectable search engine bots will respect the directives in robots.txt, but some nogoodniks and spammers do not. Report spam to Google.
Google has several other user-agents, including Feedfetcher (user-agent Feedfetcher-Google). Since Feedfetcher requests come from explicit action by human users who have added the feeds to their Google home page and not from automated crawlers, Feedfetcher does not follow robots.txt guidelines. You can prevent Feedfetcher from crawling your site by configuring your server to serve a 404, 410, or other error status message to user-agent Feedfetcher-Google. More information about Feedfetcher.
Edit or create robots.txt file
The robots.txt file needs to be at the root of your site. If your domain was example.com it should be found:
On your website:
On your server:
You can also create a new file and call it robots.txt as just a plain-text file if you don’t already have one.
Search engine User-agents
The most common rule you’d use in a robots.txt file is based on the User-agent of the search engine crawler.
Search engine crawlers use a User-agent to identify themselves when crawling, here are some common examples:
Top 3 US search engine User-agents:
Googlebot Yahoo! Slurp bingbot
Common search engine User-agents blocked:
AhrefsBot Baiduspider Ezooms MJ12bot YandexBot
Search engine crawler access via robots.txt file
There are quite a few options when it comes to controling how your site is crawled with the robots.txt file.
The User-agent: rule specifies which User-agent the rule applies to, and * is a wildcard matching any User-agent.
Disallow: sets the files or folders that are not allowed to be crawled.
Set a crawl delay for all search engines:
If you had 1,000 pages on your website, a search engine could potentially index your entire site in a few minutes.
However this could cause high system resource usage with all of those pages loaded in a short time period.
A Crawl-delay: of 30 seconds would allow crawlers to index your entire 1,000 page website in just 8.3 hours
A Crawl-delay: of 500 seconds would allow crawlers to index your entire 1,000 page website in 5.8 days
You can set the Crawl-delay: for all search engines at once with:
User-agent: * Crawl-delay: 30
By default search engines should be able to crawl your website, but you can also specify they are allowed with:
User-agent: * Disallow:
Disallow all search engines from crawling website:
You can disallow any search engine from crawling your website, with these rules:
User-agent: * Disallow: /
You can disallow just one specific search engine from crawling your website, with these rules:
User-agent: Baiduspider Disallow: /
Disallow all search engines from particular folders:
If we had a few directories like /cgi-bin/, /private/, and /tmp/ we didn’t want bots to crawl we could use this:
User-agent: * Disallow: /cgi-bin/ Disallow: /private/ Disallow: /tmp/
If we had a files like contactus.htm, index.htm, and store.htm we didn’t want bots to crawl we could use this:
User-agent: * Disallow: /contactus.htm Disallow: /index.htm Disallow: /store.htm
Disallow all search engines but one:
If we only wanted to allow Googlebot access to our /private/ directory, and disallow all other bots we could use:
User-agent: * Disallow: /private/ User-agent: Googlebot Disallow: