SEO
Noindex, canonical or robots.txt: which directive when?
Copy for AI
Robots.txt controls crawling, noindex controls indexing, canonical picks the version that counts.
That’s the whole noindex vs canonical debate in one line. All three sound like ways to forbid Google something, so teams deploy them more or less at random.
The verdict: pick the directive by the question you’re asking, not by how “strong” it feels. Stacking them usually does the opposite of what you want.
The result of mixing them up is predictable.
Pages you wanted out sit happily in the index, and pages you wanted to show disappear.
Below is a decision matrix that picks the right directive for every case.
New to the basics? Start with what SEO is.
Three directives, three different questions: what do noindex, canonical and robots.txt each do?
Each one works at a different moment in Google’s process.
First it crawls, then it indexes, then it decides which version counts.
The mistake almost always starts at the same point.
People assume all three do one thing: “take a page out of Google”. They don’t.
Robots.txt governs access
Robots.txt answers one question: may Google crawl this page or folder, yes or no?
It governs access, not visibility.
The protocol’s own standard, RFC 9309, is explicit: its rules “are not a form of access authorization”, and they’re no substitute for real security measures.
Here’s what ours looks like, one rule that lets every crawler in:
The live robots.txt of customerimpact.be, checked October 2026. Nothing is blocked, so every page can be crawled and every noindex can be read.
That file says nothing about indexing. It only opens or closes the door.
Noindex governs indexation
Noindex says: Google may crawl this page, but may not include it in the search index.
You set it in the page or in an HTTP header.
Our guide to the meta robots tag covers every value.
Canonical governs consolidation
Canonical says: this page is a variant of another one, so count the other as the real one.
It consolidates, it doesn’t exclude.
The full mechanics are in our explainer on the canonical tag.
Here’s how the three sit in Google’s process:
Once you know the question behind each directive, most borderline cases resolve themselves.
The skill isn’t the syntax. It’s knowing which question you’re asking.
Noindex vs canonical vs robots.txt: what does the decision matrix say?
Work through these questions in order. The first one that returns a “yes” gives you your directive.
1. Should Google not crawl this page at all?
Use robots.txt with a Disallow. That fits pages that waste crawl budget or are sensitive:
- internal search results
- filter combinations that generate URLs endlessly
- admin paths
Watch out: this doesn’t necessarily keep the page out of the index.
Google’s own robots.txt introduction says robots.txt “is not a mechanism for keeping a web page out of Google”.
If others link to the URL, Google can still show it, just without a description.
Our page on crawl budget explains when blocking actually saves you something.
2. Should the page be crawled but stay out of the results?
Use a noindex: <meta name="robots" content="noindex"> or the X-Robots-Tag HTTP header.
The header also works for PDFs and images, as Google’s noindex documentation explains.
MDN’s X-Robots-Tag reference says the same: rules in an HTTP header are useful for non-HTML documents like images, PDFs or other media.
For example, a price list PDF can’t carry a meta tag, so the header does the job. Setup details are in our guide to the X-Robots-Tag.
Best for: these page types:
- thank-you pages
- login screens
- thin tag archives
- a staging environment
Google visits the page, sees the instruction and leaves it out of the index.
Crucially: the page must then not be blocked in robots.txt.
Otherwise Google never sees the noindex.
3. Does the same content live on several URLs?
Use a canonical: <link rel="canonical" href="...">.
For example, say a product page is reachable through three category paths, plus a URL with a tracking parameter.
That’s four addresses for one page.
The canonical bundles link equity and stops the variants from cannibalising each other.
All versions stay reachable for the user.
Parameter variants get their own treatment in our piece on URL parameters.
4. Should identical content disappear rather than be consolidated?
Then a canonical is too soft.
Choose a 301 redirect if the old URL can go, or a noindex if the page has to keep existing but stay invisible.
A page you delete outright can also return a 404 or 410 status code. Google drops it once it recrawls the URL.
The matrix at a glance
| Your question | Directive | What happens | Watch out |
|---|---|---|---|
| Don’t crawl this | robots.txt Disallow | Google skips the URL | It can still be indexed via links |
| Crawl, don’t index | noindex (meta or header) | Page drops from results | Must stay crawlable |
| Count another version | rel=canonical | Signals move to the chosen URL | It’s a hint, not a command |
| Remove the duplicate | 301 redirect | Old URL forwards for good | Only when the old URL can go |
Pick the row that matches your question, not the one that sounds strongest.
Why do the intuitive combinations go wrong?
Because each directive needs the step before it to work. Three combinations trip up most teams.
Robots.txt plus noindex cancels itself out
The biggest pitfall is stacking robots.txt and noindex on the same page.
It feels twice as safe.
In reality they cancel each other out.
A noindex lives inside the page.
If robots.txt forbids crawling, Google never opens the page and never reads the noindex.
Google’s documentation says it plainly: “the crawler will never see the noindex rule”.
Result: the URL can end up in the index anyway.
You made the one instruction that would have kept it out unreachable.
Rule of thumb: keep the page crawlable and put a noindex on it.
Only once it has dropped out of the index may you block it in robots.txt.
A canonical won’t hide unwanted pages
A second misconception: using a canonical to hide pages you don’t want.
A canonical is a hint, not a command. Google’s guide to consolidating duplicate URLs calls it “a strong signal”, weighed alongside other signals.
That same guide ranks 3 methods:
- Redirects: a strong signal
- rel=canonical: a strong signal, in HTML or an HTTP header
- Sitemap inclusion: a weak signal
The guide adds that methods can stack, which raises the chance your preferred URL wins.
Google may ignore your canonical when the signals contradict it.
For example, when the two pages differ too much in substance.
For true duplicates it works fine.
To quietly retire thin content, you need a noindex or a redirect.
Conflicting signals are a topic of their own.
Our guide to fixing canonical conflicts shows how to find them.
Pagination canonicals hide your deeper products
A third pitfall sits with pagination and faceted navigation in webshops.
Many teams slap a canonical from page 2, 3 and onwards onto page 1.
That hides your deeper products from the index.
Google’s pagination guidance says it plainly: don’t use the first page of a paginated sequence as the canonical.
With pagination it’s usually better to let every page be itself.
Consolidate only genuine parameter duplicates.
The trade-off depends on your structure.
That’s where an SEO specialist adds value: recognising the exception.
How does this fit into your broader indexation strategy?
Directives aren’t isolated tricks.
They’re the fine-tuning on top of a healthy foundation.
Before you block or consolidate anything, find out which pages have value at all.
Start with substance, not syntax
Noindexing a page that could have produced leads is as damaging as indexing a worthless one.
So every directive choice starts with one judgement:
What does this page do for your pipeline?
Too many low-value URLs in the index has a name: index bloat.
It dilutes the pages you actually want found.
Run four checks per page
A practical order to run through per page:
- Search value? If not, consider a noindex or removal. If so, keep it indexable.
- A variant splitting link equity? Consolidate with a canonical or a redirect.
- Crawling wasted on infinite URL spaces? Close those patterns in robots.txt, never where a noindex still has work to do.
- Check in Search Console whether Google actually follows your instructions.
Duplicates that compete for the same query are a separate problem.
See keyword cannibalization for that one.
Which directive fits common page types?
Most sites run into the same handful of cases. Here’s the default for each, based on the matrix above:
| Page type | Default directive | Why |
|---|---|---|
| Thank-you or confirmation page | noindex | Useful after a form, worthless as a search result |
| Login or account page | noindex | Nothing for a searcher to find |
| Internal search results | robots.txt Disallow | Endless URL space that eats crawl budget |
| Product URL with tracking parameters | canonical to the clean URL | Same content, signals belong on one address |
| Paginated category, page 2 and beyond | self-referencing canonical | Deeper products must stay findable |
| Old page replaced by a new one | 301 redirect | Visitors and signals move to the new URL |
| Staging environment | noindex, ideally plus a login | Must never compete with the live site |
For example, say a B2B shop has a thank-you page after a quote request.
It needs a noindex, and nothing in robots.txt.
Exceptions exist, so treat the table as a starting point.
Verify in Search Console
That last check is the one most often skipped.
Setting a directive is no guarantee that Google reads or respects it.
Google itself says “it may take months for Googlebot to revisit a page”.
Use URL Inspection to request a recrawl and see the HTML Googlebot received.
The URL Inspection result shows both canonicals side by side:
If the user-declared and Google-selected canonical differ, Google overruled your hint.
The Page indexing report then lists every URL it dropped because of a noindex:
Our walkthrough of the Search Console indexing report explains every reason in that table.
Crawl activity itself shows up in the Crawl Stats report:
Crawl Stats in our own Search Console for customerimpact.be, October 2026. A noindexed page only drops out after Googlebot visits it again.
How a page ends up in the index in the first place is covered in our article on website indexing.
Want to steer the crawl itself? See setting up an XML sitemap.
Our view: directives are pipeline choices, not technical tricks
At Customer Impact we don’t treat crawl and indexation directives as a separate technical to-do.
They’re part of one growth engine with one yardstick:
Qualified pipeline.
Every directive is a choice about attention
Every page you let index, or deliberately keep out, decides where your authority and attention go.
The same principle applies to AI search engines.
ChatGPT, Google AI and Perplexity cite sources based on clarity and structure.
If your index is a mess of duplicates and thin pages, you weaken your Google ranking and your chance of being cited.
Clean directives make you findable and quotable: two layers of the same movement.
Crawlers for AI tools follow robots.txt too, as our guide to blocking AI bots in robots.txt explains.
The mistake we see most
Watch out: teams deploy directives reactively, page by page, without a picture of which content matters.
As a result they sometimes block their best pages and leave their weakest ones standing.
The matrix only works on top of a clear prioritisation of substance.
Our technical SEO checklist puts it in context.
Frequently asked questions
What is the difference between noindex and canonical?
Noindex removes a page from the search results. A canonical keeps all variants reachable but asks Google to count one URL as the real version and give it the signals.
Can you use noindex and canonical on the same page?
It sends mixed signals: one says “drop this page”, the other says “count that page instead”. Google advises against using noindex to choose a canonical, so pick one.
Does robots.txt remove a page from Google?
No. Robots.txt only stops crawling. A blocked URL can still be indexed if other pages link to it, just without a description. Use a noindex on a crawlable page instead.
How long does it take for a noindex to work?
Only after Googlebot crawls the page again. A recrawl request through URL Inspection speeds that up.
Get started
Not sure which directive belongs on which page?
Or suspect a wrong combination is holding back your visibility?
Contact us with your situation and goal. Within 24 hours you’ll hear where your biggest opportunities are, in Google and AI answers.
Free website scan
Enter your website and get an automatic scan within minutes, with concrete technical and SEO improvements. No sales pitch.
We only use your details for your scan. No spam, unsubscribe anytime.