SEO Audit (price of a coffee)Starting at $1 →
Technical SEO

What is a Robots.txt File?

The robots.txt file tells search engines which pages of your site they can or cannot crawl.

The robots.txt file is a plain text file placed at the root of your website (e.g., h1site.com/robots.txt). It acts as a guide for search engine crawlers like Google, Bing, or Yahoo.

What does it do?

  • Control crawling: You can block access to certain sections of your site (admin pages, sensitive files, duplicate pages).
  • Save crawl budget: Search engines allocate a limited number of requests per site. By blocking unimportant pages, you direct bots to your priority content.
  • Point to the sitemap: You can specify the location of your sitemap.xml file.

Example robots.txt file

User-agent: *

Disallow: /admin/

Disallow: /tmp/

Allow: /

Sitemap: https://h1site.com/sitemap.xml

Common mistakes

  • Accidentally blocking the entire site with Disallow: /
  • Forgetting to reference the sitemap
  • Thinking robots.txt prevents indexing (it prevents crawling, not indexing)

SEO Impact

A well-configured robots.txt improves crawl efficiency and ensures Google focuses its resources on your most important pages.