What robots.txt is
robots.txt is a text file at the root domain that tells crawlers which addresses (URLs) on your site search engines, and LLMs too, are allowed to crawl.
It’s one of the most misunderstood files in technical SEO. One wrong rule can hide an entire site from Google. robots.txt controls crawling, not indexing. In other words, it doesn’t hide a page from Google’s results.
Below you’ll see how to write it correctly, and how to fix the “URL blocked by robots.txt” message.

Who robots.txt is useful for (by site type)
The robots.txt file isn’t necessary for everyone in the same way.
A small brochure site usually doesn’t need to block any content. By contrast, a large e-shop with thousands of URLs from filters needs strict control, so Google doesn’t waste its crawl budget on useless URLs. The same goes for admin pages, staging environments or files that there’s no reason for search engines to crawl.
robots.txt is public. Anyone can open domain.com/robots.txt and see what you’re blocking. That’s why it isn’t a security tool. If you have pages that must stay private, they need password protection, not a Disallow line. If you want the basics of SEO before getting into the technical side, first read our guide on what SEO is and how it works in practice.

How the syntax works: User-agent, Disallow, Allow, Sitemap
The syntax rests on four basic directives. You don’t need to learn them by heart. You just need to understand what each one does.
- User-agent: sets which bot you’re addressing. Every rule “belongs” to the User-agent above it.
*means “all bots”. You can also target specific crawlers, such asGooglebot,BingbotorGPTBot. - Disallow: declares the path you don’t want crawled.
Disallow: /wp-admin/blocks an entire folder. An emptyDisallow:means “nothing blocked”. - Allow: an exception inside a blocked path. It’s useful when you close a folder but want one of its files open, e.g.
Disallow: /wp-admin/together withAllow: /wp-admin/admin-ajax.php. - Sitemap: shows the bot where your site’s sitemap is. That way Google discovers your pages more easily. It always uses a full URL. See in more detail what sitemap.xml is, with examples.
Two details that often confuse people. First, paths are case-sensitive: /Blog/ and /blog/ aren’t the same. Second, you can use wildcards. * matches any characters and $ marks the end of the address. When an Allow and a Disallow rule clash, the more specific one wins.
A robots.txt example, line by line
# Rules for all bots
User-agent: *
Disallow: /wp-admin/ # admin area
Allow: /wp-admin/admin-ajax.php # exception, the theme needs it
Disallow: /?s= # internal search
Disallow: /cart/ # cart, no reason to be crawled
# Sitemap declaration
Sitemap: https://aurora-digital-marketing.gr/sitemap_index.xml
Google’s official documentation explains each directive in detail. If you want to go deeper, see the Introduction to robots.txt on Google Search Central.
Test your file before it goes live. One wrong Disallow can hide critical pages. Run it through our robots.txt validator and tester and see which URLs are allowed and which are blocked.
Disallow doesn’t mean noindex
Disallow prevents crawling, not indexing. This difference is the reason the error you’re looking for appears. When you block a page in robots.txt, you’re telling Google “don’t read it”. You’re not telling it “don’t show it”.
In practice, if other sites link (backlinks) to a blocked address, Google may show it in the results. Then you’ll see the status “Indexed, though blocked by robots.txt” in Search Console.
To really remove a page from the results, you need the meta noindex tag.
Watch out for one trap: don’t block a page that has noindex in robots.txt. If Google can’t crawl it, it will never see the noindex, and the page will stay in the index.
| What you want to achieve | robots.txt Disallow | meta noindex |
|---|---|---|
| Stop wasting crawl budget on useless URLs | Yes | No |
| Keep a page out of the results | No | Yes |
| Remove an already indexed page | No, leave it accessible | Yes |

“URL blocked by robots.txt”: what it means and how to fix it
The message means robots.txt is blocking an address you want crawled. The fix is to find the rule that blocks it and change it.
First, make sure it’s really a problem. “Blocked by robots.txt” isn’t always bad. Many URLs are blocked on purpose, and rightly so, because blocking helps crawl management. Blocking low-value URLs and patterns helps Google find and index only your quality pages. Letting it find low-quality ones (duplicates, empty or thin content, etc.) damages the image of the whole site in Google’s eyes.
Typical URLs you want blocked:
- internal search results (
/?s=,/search) - pages with filters and endless parameter URLs (faceted navigation)
- cart, checkout, user account and “thank you” pages
- admin areas and staging environments
In these cases the status is expected and no action is needed. There’s only a problem when a page you want on Google is blocked, such as a product, a category or an important article. Then Google can neither see it nor rank it.
In Google Search Console
Here you see it as “Blocked by robots.txt” in the Page indexing report. Open the URL Inspection tool and check that specific address. It will show you which rule is blocking it. Find that Disallow line in robots.txt and either remove it or add a more specific Allow above it. Once you change it, click Validate Fix so Google checks again.
Check the URL before and after the fix. Put the address you’re worried about into our robots.txt validator and tester and see straight away whether it’s allowed or blocked, and exactly which rule is responsible.
In Merchant Center and for images
For products and images, the message says the page “can’t be crawled because of robots.txt”. Usually Googlebot or Googlebot-Image is blocked, so Google can’t check the product page.
User-agent: Googlebot Disallow: User-agent: Googlebot-Image Disallow:
The empty value after Disallow means “don’t block anything”. Give Google 24 to 72 hours to reread the file before you expect a change.
A common cause that confuses people: if you use Cloudflare, you may see this error without having written any rule yourself. Cloudflare can serve its own managed robots.txt with default restrictions. Check its bot settings, not just your site’s file.
Content-Signal: the new field for AI bots, and why not to trust it blindly
If you open a robots.txt today, you might see a line like this:
Content-Signal: ai-train=no, search=yes, ai-input=yes
It’s a statement of preference about how you allow your content to be used. Cloudflare introduced it in September 2025, as part of its Content Signals Policy. The three values are easy to read:
- search=yes: you allow normal crawling and appearance in search results.
- ai-input=yes: you allow AI tools to use the content for real-time answers.
- ai-train=no: you state that you don’t want it used for training models.
Honesty is needed here. Content-Signal isn’t a technical enforcement mechanism. It works on trust, not as a wall. Google stated explicitly that it ignores it completely for its crawlers and models. Because it isn’t an official standard, some validation tools may flag it as an unknown directive.

If you really want to stop AI bots from training on your content, the reliable way is still the classic Disallow per user-agent:
User-agent: GPTBot Disallow: / User-agent: ClaudeBot Disallow: /
Again, this only works for bots that respect robots.txt. To really block malicious scrapers, you need bot management at server level.
How to find WordPress’s robots.txt to edit it
In WordPress you don’t need to touch the server. Popular SEO plugins have a ready-made robots.txt editor in the admin. The most common options:
- Rank Math: Rank Math, then General Settings, then Edit robots.txt.
- Yoast SEO: Yoast SEO, then Tools, then File editor.
- All in One SEO: All in One SEO, then Tools, then Robots.txt Editor.
If you don’t use a plugin, the file can also be edited manually. Connect via FTP or your hosting’s File Manager, and open or create robots.txt at the root of the domain. The same applies to non-WordPress sites: a plain text file at the root is enough.
A note on WordPress: if there’s no physical file, WordPress itself generates a virtual robots.txt. You don’t see it as a file on the server, but it exists. As soon as you edit it through a plugin, a real file is created.
Checking is just as important as creating. After every change, test specific addresses with URL Inspection in Search Console. It will tell you clearly whether a page is crawlable or blocked. It’s five minutes of work that saves you from accidental blocking.
Common mistakes that cost organic visibility
Most robots.txt problems aren’t exotic. They’re few, the same ones, and they keep repeating:
- Disallow: / on a live site. It blocks the entire site. It often happens when it’s left over from staging.
- Blocking CSS and JavaScript files. Without them, Google can’t see the page properly.
- Using robots.txt for “security”. The file is public, so you’re simply showing where your hidden things are.
- Blocking a page you want to noindex. Google will never see the tag.
- Wrong capitalisation in paths.
/Category/doesn’t block/category/.
Frequently asked questions
Where should the robots.txt file be?
Always at the root of the domain, at domain.com/robots.txt. No bot reads it in subfolders.
Does every website need robots.txt?
Not necessarily. A small site without the file simply allows everything to be crawled. From medium size upwards, though, control helps.
Does Disallow remove a page from Google?
No, Disallow doesn’t remove a page from Google. It only prevents crawling. To remove it from the results, you need meta noindex with the page left accessible.
Why do I see “Indexed, though blocked by robots.txt”?
Because the page has external links and Google recorded it without reading it. If you don’t want it in the index, leave it crawlable and add noindex.
Can robots.txt protect sensitive pages?
No. It’s a public file. For protection, use a password or access restriction at server level.
Should I block AI bots?
It depends on your strategy. If you want visibility in AI answers, perhaps not. If you want to prevent use for training, block GPTBot and ClaudeBot with Disallow, not with Content-Signal.
How do I know if I’m accidentally blocking AI bots?
Open your robots.txt and look for Disallow: / under a user-agent such as GPTBot or ClaudeBot. Also watch for any blanket Disallow: / under User-agent: *, because it catches AI bots too. A robots.txt tester shows you what’s allowed per bot.
How is robots.txt related to crawl budget?
By blocking useless addresses, you direct crawlers to the pages that matter. On large sites, this helps Google crawl products and articles more often, instead of endless filter URLs. On small sites the effect is negligible.
How do I check that my robots.txt works correctly?
Use URL Inspection in Google Search Console for specific addresses. It will tell you whether each page is crawlable or blocked, and which rule is responsible. Always check after every change.
The essential takeaway
If you remember one thing, remember the difference between crawling and indexing. robots.txt manages the first, not the second. Most “URL blocked” errors start from this misunderstanding, and they’re solved as soon as you clear it up.
Not sure what your robots.txt is blocking? A technical SEO audit finds pages you’re losing without knowing it, from a wrong Disallow to wasted crawl budget. See our SEO services in detail and learn how we can help.
