The noindex rule is one of the simplest tools in SEO and one of the easiest to get wrong. A single line of code can remove a page from Google, which is exactly what you want for a thank-you page or an internal search result, and exactly what you do not want when it is accidentally left on your whole site after a redesign.
Used deliberately, noindex helps you keep low-value, duplicate or private-but-public pages out of search results so that your important pages represent your site. Used carelessly, it causes some of the most painful traffic drops we see in audits.
This guide explains what the noindex tag does, the two ways to implement it, when to use it (and when a canonical, redirect or robots.txt rule is better), how it interacts with JavaScript, and how to check it is working.
Key Takeaways
noindextells search engines not to show a page in results. It can be set with a robots meta tag or anX-Robots-TagHTTP header.- Google must be able to crawl the page to see the rule, so never block a noindexed page in robots.txt.
- Use noindex for pages that should exist for users but not in search: thank-you pages, internal search, some filter pages, staging.
- For duplicates, a canonical tag or redirect is usually better than noindex.
- Do not rely on JavaScript to remove a noindex rule; Google may skip rendering when it sees one.
What the Noindex Tag Does
Noindex is a robots rule. When Googlebot crawls a page and finds it, Google drops that page from its search results, whether or not other sites link to it. Google's robots meta tag documentation defines it simply as an instruction not to show the page, media or resource in search results.
Noindex does not stop crawling, does not stop users visiting the page and does not by itself stop link discovery (our guide to how Googlebot works explains crawling). It only controls whether the URL can appear in results. That distinction is why it is often confused with robots.txt, which controls crawling, not indexing. Our older explainer on robots.txt vs meta robots covers the difference in more depth.
How to Implement Noindex
Option 1: Robots meta tag
Place a meta tag in the <head> of the HTML page. Use robots to address all crawlers or a specific user agent such as googlebot.
<meta name="robots" content="noindex">
<!-- Google only -->
<meta name="googlebot" content="noindex">
<!-- Keep out of the index but let crawlers follow links -->
<meta name="robots" content="noindex, follow">
Links on a noindexed page can still be followed by default, so adding follow is optional.
Option 2: X-Robots-Tag HTTP header
For non-HTML files such as PDFs, images or video, or when you want to apply rules at server level, send an X-Robots-Tag header with the response.
HTTP/1.1 200 OK
Content-Type: application/pdf
X-Robots-Tag: noindex
Server configuration examples:
# Apache (.htaccess): noindex all PDF files
<Files ~ "\.pdf$">
Header set X-Robots-Tag "noindex"
</Files>
# Nginx: noindex all PDF files
location ~* \.pdf$ {
add_header X-Robots-Tag "noindex";
}
| Method | Works on | Best for | Watch out for |
|---|---|---|---|
| Robots meta tag | HTML pages | Individual pages or templates in a CMS | Plugins or themes adding it site-wide by accident |
| X-Robots-Tag header | Any file type | PDFs, images, whole directories, staging servers | Harder to see; check response headers |
| robots.txt disallow | Crawling only | Saving crawl resources | Does not reliably remove pages from the index |
| Password protection | Any content | Truly private content and staging sites | None for SEO; it is the safest option for private content |
The Robots.txt Trap
The most common noindex mistake is combining it with a robots.txt disallow. If robots.txt blocks a URL, Google cannot crawl it, so it never sees the noindex rule. The URL can still appear in results, typically without a description, if other pages link to it.
Google's robots meta tag documentation spells this out: if a page is disallowed from crawling, any indexing or serving rules on it will not be found and will be ignored. So the correct sequence for removing pages is: allow crawling, add noindex, wait for Google to recrawl and drop the pages, then (optionally) block crawling later if you need to save crawl resources.
When to Use Noindex (and When Not To)
Good candidates for noindex:
- Thank-you, order confirmation and other post-conversion pages.
- Internal site search results pages.
- Low-value filter and sort combinations in ecommerce (see our faceted navigation guide).
- Login, account and cart pages that are publicly reachable.
- Thin tag or author archives you do not want to improve.
- Staging or test environments that cannot be password-protected.
Better alternatives in other cases:
| Situation | Use instead of noindex | Why |
|---|---|---|
| Duplicate or near-duplicate pages | Canonical tag | Consolidates signals to the preferred URL |
| Page permanently moved | 301 redirect | Sends users and signals to the new URL |
| Page deleted with no replacement | 404 or 410 status | Clear signal the page is gone |
| Paginated category pages | Keep indexable with self-canonicals | Helps discovery of linked items |
| Private content | Password protection | Keeps it from users and crawlers |
| Thin but improvable content | Improve or merge it | Turns a weak page into an asset |
For duplicates, see our guide to the canonical tag, and for parameter-driven duplicates read URL parameters and SEO. For deciding whether thin pages should be noindexed, merged or deleted, read thin content and content pruning. For paginated series, our pagination guide explains why noindexing page 2 onwards is usually unnecessary.
Noindex and JavaScript
On JavaScript-heavy sites, the order of operations matters. If the initial HTML contains a noindex tag, Google may never run the code that would remove it.
“When Google encounters the noindex tag, it may skip rendering and JavaScript execution.”
— Google Search Central, Understand JavaScript SEO basics
So do not ship noindex in the HTML template and rely on client-side code to remove it for real pages. The reverse (adding noindex with JavaScript to error states in a single-page app) is one of the approaches Google suggests for avoiding soft 404 errors. Our JavaScript SEO guide covers rendering in more detail.
Conflicting Rules
Pages sometimes end up with two robots tags, for example one from the CMS and one from an SEO plugin. Google's rule is simple:
“In the case of conflicting robots rules, the more restrictive rule applies.”
— Google Search Central, Robots meta tag, data-nosnippet, and X-Robots-Tag specifications
That means a stray noindex anywhere, in the HTML or in an HTTP header, wins. Audits should check both.
How to Implement Noindex Safely: Step by Step
- List the URLs or patterns you want out of the index and confirm the reason for each.
- Check they are crawlable. Remove any robots.txt disallow that would hide the rule.
- Add the meta tag or header at template or server level so it applies consistently.
- Remove the URLs from your XML sitemap. Sitemaps should list only pages you want indexed; see our XML sitemaps guide.
- Test with URL Inspection in Search Console to confirm Google sees the rule.
- Monitor the Page Indexing report for "Excluded by 'noindex' tag" and check nothing important appears there.
- Recheck after every deployment, especially site migrations and theme changes.
Common Mistakes
- Launching with a staging noindex. The classic: a "discourage search engines" setting or a staging header left on after go-live.
- Noindex plus robots.txt disallow. Google cannot see the rule.
- Noindexing pages that are in the sitemap. Sends mixed signals and clutters reports.
- Using noindex for duplicates you should canonicalize. You lose the chance to consolidate signals.
- Noindexing pagination by default. Can make linked products or posts harder to find.
- Combining noindex with a canonical to another URL. These send conflicting signals; pick one.
How to Check Whether a Page Is Noindexed
Use the URL Inspection tool in Search Console to see whether Google found a noindex rule. Check the page source for the meta tag and the response headers for X-Robots-Tag (browser developer tools show these under the Network tab). Site crawlers flag noindexed pages in bulk. For site-wide trends, the Search Console Page Indexing report lists URLs excluded by noindex. If a page you removed still shows up, Google probably has not recrawled it yet; requesting indexing through URL Inspection can speed that up.
Related Guides
- How to Test and Fix Structured Data
- Server-Side Rendering vs Client-Side Rendering for SEO
- Headless CMS SEO: What to Get Right
Frequently Asked Questions
Does noindex stop Google from crawling a page?
No. Google still crawls noindexed pages, though usually less often over time. Noindex controls indexing; robots.txt controls crawling.
How long does it take for a noindexed page to disappear?
It disappears after Google recrawls the page and sees the rule. That can take days or weeks depending on how often the page is crawled; URL Inspection can prompt a recrawl.
Should I use noindex or a canonical tag for duplicate pages?
Usually a canonical tag, because it points signals to the preferred version. Noindex simply removes the page without consolidating anything.
Do links on a noindexed page still count?
Google can still follow links on a noindexed page, but pages that stay noindexed for a long time are typically crawled less often, so do not rely on them for important internal links.
Can I noindex a PDF?
Yes, by sending an X-Robots-Tag: noindex HTTP header with the file, because PDFs cannot contain a meta tag.
Conclusion
Noindex is a precise tool: use it for pages that serve users but do not belong in search, make sure Google can crawl them to see the rule, and keep checking that it has not crept onto pages that matter. If you suspect indexing problems are holding your site back, our technical SEO team can audit it, or you can request a free quote.




