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
| Rule | What it does |
|---|---|
User-agent | Names the crawler the rules apply to, such as Googlebot, GPTBot or * for all. |
Disallow | A path the crawler shouldn’t crawl. |
Allow | An exception inside a disallowed path. |
Sitemap | The 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
Disallow: /left over from a staging site, which blocks the entire site. See checking whether you’re accidentally blocking Google.- Blocking CSS and JavaScript, which stops Google rendering pages properly. See images and CSS blocked from Googlebot.
- Using robots.txt to fix duplicate content, when a canonical URL is the right tool.
- Blocking AI crawlers without thinking it through; read whether to allow or block AI crawlers.
How to check yours
- Open it in a browserVisit
yourdomain.ie/robots.txtand read every line. - Check Search ConsoleSettings, robots.txt shows the version Google fetched and any errors.
- 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.