Home / Glossary / Technical SEO

Technical SEO

robots.txt

In shortRobots.txt is a plain text file at the root of a site that tells compliant crawlers which paths they may or may not request. It manages crawling, not indexing, and it is a voluntary standard, so it is not a security tool. A blocked URL can still appear in search results if other pages link to it.

SEO Company Philippines glossary. Last reviewed November 2026.

  • What it isA text file of crawl rules at the site root
  • Who it matters toAnyone managing crawl access, from small sites to large ones
  • How it is measuredSearch Console robots.txt report and a crawl test
  • Common mistakeUsing it to hide pages from search or blocking whole sections by accident
  • Related workTechnical SEO and crawl management

What is robots.txt?

Before crawling a site, well behaved bots request a file at /robots.txt on that host. The file lists rules by user agent, which is the name a bot uses to identify itself. The bot then skips the paths it is told not to fetch.

Each host and protocol needs its own file. The rules for one subdomain do not apply to another. Because compliance is voluntary, reputable search engines follow it, but malicious bots can ignore it.

What can you put in robots.txt?

A small set of directives covers most needs.

DirectiveWhat it does
User-agentNames the bot the following rules apply to
DisallowAsks that bot not to request a path
AllowPermits a path inside a broader disallowed area
SitemapPoints to the full address of your XML sitemap

Does robots.txt keep a page out of Google?

Not reliably. Robots.txt stops the page being fetched, but if other sites link to it, the address can still be indexed without its content. To keep a page out of results, use a noindex directive and leave the page crawlable so the bot can read it.

Never use robots.txt to protect private information. The file is public, and anyone can read it. Use authentication for anything sensitive.

How do you check robots.txt and avoid mistakes?

One wrong line can block an entire site, so review the file whenever a site is launched or migrated.

  1. Open the fileVisit yourdomain.com/robots.txt and read every rule.
  2. Look for blanket blocksA rule that disallows the whole site is often a leftover from a staging setup.
  3. Test key URLsUse Search Console to confirm that important pages, scripts and styles are not blocked.
  4. Check the sitemap lineMake sure it points to a live, current sitemap.
  5. Re-check after releasesDeployments can overwrite the file without anyone noticing.

Need help with robots.txt on your site?

Tell us what is not working. We will check where this affects your search results and what to fix first.

Book a meetingTechnical SEO

Questions people ask

Can robots.txt block AI crawlers?

It can set rules for crawlers that identify themselves and choose to respect it. Many AI companies publish user agent names for this. Compliance is voluntary, so it is a request, not a technical barrier.

Should I block CSS and JavaScript files?

Generally no. Search engines may need those files to render the page and understand the layout. Blocking them can lead to a poor reading of the page. Check with the URL inspection tool if you are unsure.

What happens if I have no robots.txt file?

Crawlers treat the site as open and may request any public URL. That is fine for many sites. A file becomes useful when you want to steer bots away from low value areas or point them to your sitemap.

Inspect the original evidence