These three are mixed up all the time, and the wrong choice often does the opposite of what you wanted.
What each one does
| Tool | Tells crawlers | Effect |
|---|---|---|
robots.txt Disallow | Do not fetch this address | Saves crawl effort. Does not reliably keep a page out of the index |
noindex | You may fetch it, but do not index it | Removes the page from results |
rel="canonical" | This is a copy; the main version is over there | Consolidates duplicates. A hint, not a command |
The classic mistake
Blocking a page in robots.txt and adding noindex. The crawler is not allowed to fetch the page, so it never sees the noindex. The address can still appear in results, without a description, because other sites link to it.
If you want a page out of the index: allow crawling, serve noindex, and wait until it has dropped out.
When to use which
- Admin areas, internal search results, endless filter combinations:
robots.txt. You do not want them fetched at all. - Thank-you pages, thin tag archives, staging copies that must stay reachable:
noindex. - The same content at several addresses (tracking parameters, sort orders, print versions): canonical to the main address.
- A page that has moved for good: none of these. Use a 301 redirect.
Combinations to avoid
-
noindexplus a canonical pointing elsewhere: mixed signals. Pick one. - A canonical pointing to a page that redirects or returns 404.
- Listing
noindexor blocked addresses in the sitemap.
Verify from the outside
curl -sI https://example.com/page | grep -i x-robots-tag curl -s https://example.com/page | grep -iE 'rel="canonical"|name="robots"' curl -s https://example.com/robots.txt Remember that noindex can arrive as an HTTP header as well as a meta tag, and a leftover header from staging is easy to miss.
When you need to check these signals across a whole site instead of one address at a time, a crawler does it in one pass. That is one of the jobs we built Rankar.ai for.
