SEO Glossary

What is robots.txt? (robots.txt)

robots.txt is a simple text file in your site's root (domain.com/robots.txt) — it tells search engine bots (like Googlebot) which parts they're allowed to crawl and which to skip. It's the first thing any bot looks for when visiting your site.

Key directives (Syntax)

User-agent: specifies which bot the rules apply to (Googlebot or * for all). Disallow: blocks crawling of a path. Allow: permits an exception. Sitemap: points to your sitemap location. Practical example: User-agent: * then Disallow: /admin/ then Sitemap: https://example.com/sitemap.xml

Most dangerous mistake: accidentally blocking your whole site

One line — Disallow: / — is enough to hide your entire site from Google. This mistake happens often when staging sites go live without removing the block. Always verify your file after any launch or major update.

Related terms

Crawl Budget XML Sitemap Noindex Canonical Tag Googlebot

These term pages are coming soon to the glossary.

FAQ

robots.txt questions

Where is the robots.txt file located?

In the site root: domain.com/robots.txt — Google ignores it anywhere else.

Does robots.txt prevent indexing?

No — this is one of the most common misconceptions. robots.txt only blocks crawling, but a page can still get indexed if external links point to it. Use noindex to prevent indexing.

What is the difference between robots.txt and meta robots?

robots.txt handles crawling site-wide before the bot visits the page, while meta robots is a tag inside the page itself controlling indexation (noindex) and link following (nofollow) for that specific page.