robots.txt is a plain text file at yourdomain.co.uk/robots.txt that gives instructions to crawlers: search engines like Googlebot and Bingbot, and AI crawlers such as GPTBot or ClaudeBot.
What it can do
- block crawling of areas like
/basket/,/account/or internal search results - set different rules for different crawlers
- point crawlers to your XML sitemap
What it cannot do
- It does not remove pages from Google. A blocked page can still be indexed if other sites link to it. Use a
noindextag instead, and do not block that page in robots.txt or Google will never see the tag. - It is not security. Well-behaved crawlers obey it; bad actors ignore it.
The costly mistake
A single line, Disallow: /, blocks the entire site. It often slips through when a staging site goes live with its “hide from Google” setting still on. Check robots.txt after every launch.
AI crawlers
You can allow or block AI crawlers individually. Blocking them keeps your content out of some AI training sets, but can also reduce your chances of being cited in AI answers. For most businesses that want visibility in AI search (see GEO), allowing them is the better choice. A companion proposal, llms.txt, goes the other way and hands AI tools a summary of the site.
Related terms
XML sitemap
An XML sitemap is a file listing the pages you want search engines to find and index, helping Google discover new and updated content more quickly.
llms.txt
llms.txt is a proposed plain-text file at the root of a website that gives AI tools a concise, curated summary of the site and links to its key pages.
SEO
Search engine optimisation: improving your website so it ranks higher in Google's unpaid results and wins more visits from people already searching.
Canonical URL
A canonical URL tells search engines which version of a page is the main one when the same content can be reached at several different web addresses.