Glossary Glossary

What Is a Robots.txt File?

A small text file at the root of your website that tells crawlers where they may and may not go. It controls crawling, not indexing, and one wrong line can hide a whole site.

Share this guide

A robots.txt file is a plain text file at the root of your website that gives instructions to crawlers such as Googlebot. It tells them which parts of the site they may visit and which to skip. Every crawler that follows the standard checks it before crawling.

Quick answer

Robots.txt lives at yourdomain.ie/robots.txt and uses simple rules (User-agent, Disallow, Allow) to control crawling. It doesn’t control indexing: a blocked page can still appear in Google if other pages link to it. To keep a page out of search results, use noindex instead.

What a robots.txt file looks like

User-agent: *
Disallow: /wp-admin/
Allow: /wp-admin/admin-ajax.php

Sitemap: https://example.ie/sitemap_index.xml

This tells every crawler (*) not to crawl the WordPress admin area, except one file that front-end features need, and points to the XML sitemap. WordPress creates a basic virtual robots.txt automatically, and SEO plugins let you edit it.

The main rules

RuleWhat it does
User-agentNames the crawler the rules apply to, such as Googlebot, GPTBot or * for all.
DisallowA path the crawler shouldn’t crawl.
AllowAn exception inside a disallowed path.
SitemapThe full URL of your sitemap.

Robots.txt is not for hiding pages

This is the most common misunderstanding. If you block a page in robots.txt, Google can’t crawl it, so it can’t see a noindex tag on it either. If other pages link to it, the URL can still be indexed, usually without a description. To remove a page from results, allow crawling and use a noindex rule (see the robots meta tag). For private content, use a password.

Common mistakes

How to check yours

  1. Open it in a browserVisit yourdomain.ie/robots.txt and read every line.
  2. Check Search ConsoleSettings, robots.txt shows the version Google fetched and any errors.
  3. Test important URLsURL Inspection in Search Console says whether robots.txt blocks a page.

Related terms: crawl budget and orphan page. For the bigger picture, read why Google isn’t crawling your website and the technical SEO guide. Our technical SEO service and SEO audit both review robots.txt.

Frequently asked questions

Does every website need a robots.txt file?

No. Without one, crawlers assume they may crawl everything. Most sites still have one, often created automatically.

Can robots.txt remove a page from Google?

No. It stops crawling, not indexing. Use noindex or remove the page.

Is robots.txt a security measure?

No. The file is public and only well-behaved crawlers obey it.

How quickly does Google see changes?

Google generally caches robots.txt for up to a day, so changes usually take effect within 24 hours.

Sources and further reading

  1. Introduction to robots.txtGoogle Search Central.
  2. How Google interprets the robots.txt specificationGoogle Search Central: rules, limits and error handling.
  3. Block search indexing with noindexGoogle Search Central.

Last updated 25 November 2026. Google changes its tools and reports regularly, so check the official sources above if something on screen looks different. This guide is general information, not advice for your specific website.

Found this useful? Share it