What it is
robots.txt is a text file at the root of your site, for example example.com/robots.txt. It tells crawlers which addresses they may visit. A sitemap is a file that lists the pages you want search engines to find.
Why it matters
- robots.txt does not keep a page out of Google. A blocked address can still appear in results, without a description.1
- A noindex rule works only when Google may crawl the page. If robots.txt blocks the page, Google never sees the rule.2
- Blocking scripts, styles or images in robots.txt can make your pages harder for Google to understand.1
- When robots.txt answers with a server error, Google stops crawling the site for the first 12 hours. A 4xx answer, except 429, counts as if there were no robots.txt.3
- A sitemap is a hint. Submitting one does not mean Google will download it or crawl every address in it.4
How to check
- Open
/robots.txton your site. It should load without an error. Google ignores anything beyond the first 500 KiB of the file.3 - Read the
Disallowlines. Look for pages, folders or files that you want in search. - Open your sitemap. One sitemap file can hold up to 50,000 addresses or 50 MB uncompressed.4
What to do
- Remove rules that block pages, scripts, styles or images Google needs to understand your pages.1
- To keep a page out of Google, use noindex and leave the page open to crawlers.2
- Change
lastmodin the sitemap only when the page really changed. Google uses it only when it is consistently accurate, and ignorespriorityandchangefreq.4 - If your site is small, you may not need a sitemap at all: Google names sites of about 500 pages or fewer as a case where it might not be needed.5
In SEO Control
Every SEO Control check reads your robots.txt and sitemaps and reports rules that block pages or files you want in search. Google can find you
Sources
Each numbered note in the text links to the source below. We use Google's own documentation where it exists.
- Introduction to robots.txt. Google Search Central, checked Oct 30, 2026.
- Robots meta tag, data-nosnippet and X-Robots-Tag specifications. Google Search Central, checked Oct 22, 2026.
- How Google interprets the robots.txt specification. Google Search Central, checked Oct 22, 2026.
- Build and submit a sitemap. Google Search Central, checked Oct 22, 2026.
- Learn about sitemaps. Google Search Central, checked Oct 30, 2026.
More guides
- Your website is down: what happens in Google
- Pages that are not in Google's index
- Missing or weak page titles and descriptions
- Broken links and redirects
- Slow pages on phones
- Your traffic changed after a Google update
- HTTPS, certificates and domain expiry
- What Domain Rating means
- How to read Google Search Console