Free SEO audit for new clients — claim yours
Home/Blog/Technical SEO/The Noindex Tag: When and How to Use It
Technical SEO

The Noindex Tag: When and How to Use It

The Noindex Tag: When and How to Use It
Table of contents
  1. Key Takeaways
  2. What the Noindex Tag Does
  3. How to Implement Noindex
    1. Option 1: Robots meta tag
    2. Option 2: X-Robots-Tag HTTP header
  4. The Robots.txt Trap
  5. When to Use Noindex (and When Not To)
  6. Noindex and JavaScript
  7. Conflicting Rules
  8. How to Implement Noindex Safely: Step by Step
  9. Common Mistakes
  10. How to Check Whether a Page Is Noindexed
  11. Related Guides
  12. Frequently Asked Questions
    1. Does noindex stop Google from crawling a page?
    2. How long does it take for a noindexed page to disappear?
    3. Should I use noindex or a canonical tag for duplicate pages?
    4. Do links on a noindexed page still count?
    5. Can I noindex a PDF?
  13. Conclusion
  14. References

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

  • noindex tells search engines not to show a page in results. It can be set with a robots meta tag or an X-Robots-Tag HTTP 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";
}
MethodWorks onBest forWatch out for
Robots meta tagHTML pagesIndividual pages or templates in a CMSPlugins or themes adding it site-wide by accident
X-Robots-Tag headerAny file typePDFs, images, whole directories, staging serversHarder to see; check response headers
robots.txt disallowCrawling onlySaving crawl resourcesDoes not reliably remove pages from the index
Password protectionAny contentTruly private content and staging sitesNone 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:

SituationUse instead of noindexWhy
Duplicate or near-duplicate pagesCanonical tagConsolidates signals to the preferred URL
Page permanently moved301 redirectSends users and signals to the new URL
Page deleted with no replacement404 or 410 statusClear signal the page is gone
Paginated category pagesKeep indexable with self-canonicalsHelps discovery of linked items
Private contentPassword protectionKeeps it from users and crawlers
Thin but improvable contentImprove or merge itTurns 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

  1. List the URLs or patterns you want out of the index and confirm the reason for each.
  2. Check they are crawlable. Remove any robots.txt disallow that would hide the rule.
  3. Add the meta tag or header at template or server level so it applies consistently.
  4. Remove the URLs from your XML sitemap. Sitemaps should list only pages you want indexed; see our XML sitemaps guide.
  5. Test with URL Inspection in Search Console to confirm Google sees the rule.
  6. Monitor the Page Indexing report for "Excluded by 'noindex' tag" and check nothing important appears there.
  7. 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.

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.

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.

References

  1. Google Search Central: Block Search indexing with noindex
  2. Google Search Central: Robots meta tag, data-nosnippet, and X-Robots-Tag specifications
  3. Google Search Central: Understand JavaScript SEO basics
  4. Google Search Central: SEO Starter Guide
  5. Semrush: What Is Noindex Used for?
Rohit Choudhary
Written byRohit ChoudharyCo-Founder, My SEO Experts

Rohit Choudhary is the co-founder of My SEO Experts and has more than 14 years of hands-on experience in SEO, paid advertising and digital marketing. Since starting out in 2011 he has helped hundreds of businesses grow through practical, data-driven search strategies, and he also serves as a consulting Digital Marketing Director for several US-based companies.

Keep reading

Related articles

Ready to grow your business online?

Get a free, no-obligation proposal tailored to your goals and budget.

CallFree Quote