Preferences

Privacy is important to us, so you have the option of disabling certain types of storage that may not be necessary for the basic functioning of the website. Blocking categories may impact your experience on the website. More information (Cookie Policy)

Noindex: How to Keep a Page Out of Google's Index in 2027

Noindex is a directive that tells search engines not to show a page in their results. How to add it, when to use it and the mistakes that deindex sites.

Published on
17/10/2026
Updated on
17/10/2026
Reading time
12 min
Sorank customerSorank customerThomas Girauc, Sorank customerCelio Fabiano, Sorank customerSorank customerXavier Breull, Sorank customer
+ 9'000 Subscribers
Noindex: How to Keep a Page Out of Google's Index in 2027
Notification: your site reached 20K clicks from Google Search in 28 days

Tools

On this page

Summary

Noindex is a directive, placed in a robots meta tag or an HTTP header, that asks search engines to crawl a page but not to show it in their results. It is the reliable way to keep a page out of Google's index.

Want to go further? Ask

Noindex is an instruction that tells search engines not to include a page in their index, and therefore not to display it in search results. It is set either in the HTML of the page, with the tag <meta name="robots" content="noindex"> in the head, or in the HTTP response, with the header X-Robots-Tag: noindex, which also works for PDFs and other non-HTML files. Google, Bing and most other engines respect it.

Noindex is a precise tool: it removes a URL from the results without making it inaccessible to users. A thank-you page, an internal search result page or a login page can stay online and useful while being invisible in Google. Used by mistake, the same tag can make a whole site disappear from search within days, which is why it deserves careful handling.

How does noindex work?

A search engine must crawl a page to read its noindex directive. When Googlebot fetches the URL and finds the tag or header, it drops the page from the index, or never adds it. On the next crawls, the page stays excluded as long as the directive is present. In Google Search Console, these URLs appear in the page indexing report under "Excluded by 'noindex' tag".

Because the engine needs to see the directive, noindex only works on pages that crawlers are allowed to fetch. If the URL is blocked in robots.txt, Google cannot read the tag, and the URL may even remain in the index without a description if other sites link to it. Google also stopped supporting noindex lines inside robots.txt in 2019: the directive must live in the page or in the header.

Noindex vs robots.txt vs canonical

The three tools answer different questions. Robots.txt controls crawling: it asks bots not to fetch some URLs, which saves crawl budget but does not guarantee deindexing. Noindex controls indexing: the page can be crawled but will not be shown. The canonical tag handles duplicates: it tells Google which version of similar pages to index, and passes signals to it, without removing the others from discovery.

A simple rule: to consolidate duplicates, use canonical; to keep a useful but non-searchable page out of results, use noindex; to stop bots from wasting time on endless URLs such as some filters, use robots.txt, knowing that those URLs will not be removed from the index by it.

When should you use noindex?

Typical candidates are pages that serve users but have no value as a search result: order confirmation and thank-you pages, internal search results, account and cart pages, printable versions, tag archives with a handful of posts, and staging or test environments that must never appear. Thin pages you plan to improve can also be noindexed temporarily, although improving or merging them is usually better, as explained in our page on thin content.

Noindex is not the right tool for confidential content. The page remains publicly accessible to anyone with the URL. Real protection requires authentication or a password.

Noindex vs disallow: which one keeps a page out of Google?

Disallow is a rule in your robots.txt file that asks crawlers not to fetch a URL. Noindex asks search engines not to show a page, and it only works if the crawler can open that page and read the tag. The two look like they do the same job, but they act at different steps. Mixing them up is one of the most common reasons a page stays in Google.

SituationDisallow in robots.txtNoindex in the page
Crawler fetches the pageNoYes
Removes a URL already in GoogleNoYes, once Google reads the tag
Saves crawl budgetYesNo, the page is still fetched
URL can appear in resultsYes, without a descriptionNo

Google's documentation on blocking indexing is clear: noindex only works if the page is not blocked by robots.txt, because the crawler never sees the tag. A disallowed page can still show up in results as a bare address, often because other sites link to it.

So the order matters. To remove a page that is already indexed, follow these steps:

  1. Remove the disallow rule that covers the URL.
  2. Add the noindex tag or the X-Robots-Tag header, and check it with the URL Inspection tool.
  3. Ask Google to recrawl the URL in the same tool. Google notes that a revisit can take months, so check the indexing report over several weeks.
  4. Only after the URL has left the results, add a disallow rule if crawling it costs you resources.

A rule like this one stops crawlers from fetching your internal search results:

User-agent: *
Disallow: /search/

It saves crawl budget, but it does not remove results already in the index. For that, use noindex first. Disallow values are path prefixes and are case-sensitive, so Disallow: /Guide does not block /guide.

Tip

Before you ship a disallow rule, make sure none of the pages you want deindexed are covered by it. Sorank's free robots.txt checker validates the syntax of your file, and our guide on blocked by robots.txt explains the warning you may see in Search Console.

How to add noindex correctly

In a CMS, use the built-in option: most SEO plugins and site builders offer a "hide from search engines" switch per page. In custom code, add the robots meta tag in the head, or configure the server to send the X-Robots-Tag header for a folder or file type. You can combine values, for example "noindex, follow", which keeps the links of the page crawlable.

Then check the result: inspect the URL in Search Console, confirm that the tag is in the rendered HTML, and make sure the page is not blocked in robots.txt. To remove a page quickly, the Removals tool hides it for about six months while the noindex takes effect. Sorank's free indexability checker shows whether a URL carries a noindex directive.

Robots Meta Tag vs X-Robots-Tag: Which One to Use

Use the robots meta tag on regular HTML pages. Use the X-Robots-Tag header for everything else, such as PDFs, images and videos, or when you cannot edit a page's HTML. Both accept the same directives, noindex included, so the choice depends on where you can place the instruction.

CriteriaRobots meta tagX-Robots-Tag header
LocationInside the HTML, in the headIn the HTTP response sent by the server
Non-HTML files (PDF, images, video)Not possibleSupported
Visible in the page sourceYesNo, only in the response headers
Typical setupA CMS option or a line in the templateServer, CDN or hosting configuration
Target a single crawlerYes, with a name such as googlebotYes, with a prefix such as googlebot: noindex

Google's documentation presents the header as the option for cases where a meta tag is not possible, such as non-HTML files.

The syntax side by side

<!-- In the head of the HTML -->
<meta name="robots" content="noindex, follow">
<meta name="googlebot" content="noindex">

# In the HTTP response headers
X-Robots-Tag: noindex
X-Robots-Tag: googlebot: noindex

The name="googlebot" version only targets Google. Use name="robots" to address all engines at once.

Server rules for PDFs

On Nginx, this rule sends the header for every PDF:

location ~* \.pdf$ {
    add_header X-Robots-Tag "noindex";
}

On Apache, the same result comes from mod_headers, in .htaccess or the virtual host:

<FilesMatch "\.pdf$">
  Header set X-Robots-Tag "noindex"
</FilesMatch>

Mistakes to avoid

  • Putting the meta tag in the body of the page. Keep it in the head.
  • Forgetting always in Nginx. Without it, add_header sends the header only on success and redirect responses, so error pages can lose it.
  • Sending two different values for the same page, such as index in the meta tag and noindex in the header. Pick one source and keep it consistent.
  • Blocking the file in robots.txt. A crawler that cannot fetch the URL never reads the header.

Tip

A header does not appear in the HTML source, so check the response itself. Sorank's free headers checker lists the headers of any URL. For the meta tag side, see our page on meta tags.

How to test an X-Robots-Tag header with curl

The X-Robots-Tag header is invisible in the browser, so check the response itself. Request the URL and read its headers. If the line X-Robots-Tag: noindex appears, the server sends the instruction on that request.

curl -s -D - -o /dev/null https://www.example.com/guide.pdf | grep -i x-robots-tag

The flags print the headers to the terminal and discard the body. Use a GET request like this one rather than curl -I. Some servers answer HEAD requests with different headers, so a header missing from a HEAD check may still appear on a normal GET.

Check the CDN and cache layers

A header set at the origin server can be stripped, replaced or served from cache by a CDN or reverse proxy. Test the public URL, not the origin, and clear the cache before you retest. If the header is present at the origin but missing on the public URL, the problem sits between the two.

Static hosts: the _headers file

Netlify reads header rules from a file named _headers in your publish directory, so you need no server configuration. A path line starts at the left margin, and each header goes on an indented line below it:

/guide.pdf
  X-Robots-Tag: noindex

Deploy the site, then rerun the curl test. For a whole folder, use a wildcard path, and test a few files afterwards, because a pattern that is too broad can hide pages you want indexed. Netlify's headers documentation lists the path rules.

Tip

Test one URL you want blocked and one you want indexed. If both return the header, the rule is too broad.

For more on how crawlers reach your URLs, read our page on crawlability, or our guide to status codes and tags for developers.

Common noindex mistakes

The most damaging mistake is leaving the "discourage search engines" option active after a site launch or a migration: the staging setting goes live and the whole site is deindexed. The second is combining noindex with a robots.txt block, which prevents Google from seeing the tag. The third is placing noindex on pages that also carry a canonical to another URL, which sends contradictory signals. Finally, noindexing paginated categories or important filters can cut crawlers off from the products they list.

Why noindex matters for SEO and GEO

For SEO, noindex keeps the index clean: fewer low-value URLs means search engines focus on the pages that deserve to rank. For GEO, the effect is direct. AI assistants such as ChatGPT search or Perplexity rely on web indexes, including Bing's, to find sources. A page excluded by noindex is generally absent from those indexes and cannot be cited. Checking that your key pages are indexable is a prerequisite for any visibility in the AIs.

Conclusion

Noindex tells search engines not to show a page in their results. It works through a robots meta tag or an X-Robots-Tag header, requires the page to be crawlable, and suits pages that are useful to visitors but useless in search. Used with care, it keeps the index focused; left on by mistake, it can erase a site from Google.

To go further, read our pages on indexing and robots.txt. Reference sources: Google on blocking indexing with noindex and Google's robots meta tag specifications.

Meta robots tag: syntax, values and placement

The meta robots tag is a single line in the head of a page that gives instructions to crawlers. Use name="robots" to address all engines, or name="googlebot" to address only Google. The content attribute takes one or more comma-separated directives, so a single tag can keep a page out of results and stop Google from following its links.

<meta name="robots" content="noindex, nofollow">

The directives you will use most are listed below.

DirectiveWhat Google does
noindexKeeps the page out of search results
nofollowTells Google not to follow the links on the page
noneSame as noindex, nofollow
nosnippetBlocks text snippets and video previews, and stops Google from using the content as direct input for AI Overviews and AI Mode
max-snippet:50Caps the text snippet at 50 characters
unavailable_after:2027-01-31Removes the page from results after that date, which suits expiring offers
noarchiveIgnored by Google Search, since the cached link no longer exists

Place the tag in the <head> of your page. Google says it belongs there, but it also reads tags placed in the body, so a misplaced tag may still work. Do not rely on that: a tag outside the head is harder to audit and easy to lose when a template changes.

Use name="googlebot" only when Google needs rules that differ from other engines, since name="robots" already covers Googlebot. For example, this line hides the snippet from Google alone:

<meta name="googlebot" content="nosnippet">

A page can also carry several robots tags, for example one from your CMS and one from a plugin. When rules conflict, Google applies the more restrictive one: a noindex from any source keeps the page out, and nosnippet wins over max-snippet:50. Remove duplicate tags so that each page carries one clear instruction.

Tip

A plugin or theme can add a second tag without you noticing. Check the rendered page source, not only the template you edited.

For the Search Console side of this, read our page on excluded by noindex tag. For the other tags that go in the head, see meta tags.

Meta robots tag added with JavaScript: why it can fail

A meta robots tag works best when it is already in the HTML that the server sends. If a script adds the tag after the page loads, Google may never act on it. Google warns that when it encounters a noindex tag, it may skip rendering and JavaScript execution. Keep noindex in the first response, written by your server, template or CMS.

The same limit applies in reverse. Google also says that changing or removing a noindex with JavaScript may not work as expected, because the script may never run. If a page should be indexed, do not put noindex in its original code at all.

View source and the Elements panel show different things

"View page source" shows the HTML the server sent. In Chrome, press Ctrl+U (Cmd+Option+U on Mac). The Elements panel in DevTools shows the DOM after JavaScript has run. If a robots tag appears only in Elements, a script added it, and Google may ignore it.

To check the raw HTML from the command line, search the response for the directive:

curl -s https://www.example.com/thank-you | grep -i noindex

An empty result means the HTML body does not contain noindex. Headers are not part of the body, so check them separately. Also look at the output, not only the template you edited, since a plugin can add its own tag.

What to do instead

  • Render the robots tag on the server, in the head of your template.
  • Set noindex per page through your CMS or framework metadata settings, so it reaches the first response.
  • Remove any script that adds or edits robots tags on pages that matter.

Tip

If a page must stay out of Google, put noindex in the server response from the first byte. Verify it with view source, not with the Elements panel.

Google explains the rendering side in its JavaScript SEO basics documentation. For more on how rendering affects what crawlers see, read our page on JavaScript SEO.

Sources

Frequently asked questions

How long does it take for a noindex page to disappear from Google?

The page is removed after Googlebot recrawls it and sees the directive, which can take from a few days to several weeks depending on how often the page is crawled. Requesting a recrawl with the URL Inspection tool speeds it up, and the Removals tool can hide the URL temporarily in the meantime.

Should I block a noindex page in robots.txt?

No. If the page is blocked in robots.txt, Google cannot crawl it and never sees the noindex tag, so the URL can stay in the index. Keep noindex pages crawlable until they have been removed.

What does "noindex, follow" mean?

It asks search engines not to index the page while still following the links it contains. It is a common setting for archive or utility pages whose links lead to content you want crawled. Follow is the default behaviour, so "noindex" alone has the same effect for links.

Our Blog for Ambitious Company

Testimonials from ambitious founders

0 to 10000 visitors in 5 months

Celio Fabianomonrobotlavevitre.frGoogleE-commerce

0 to 5000 visits in 8 months

Thibault BMsorank.comGoogleSoftware

0 to 1104 clicks in 4 months

Dominiqueflight-sensations-idf.comGoogleLeisure and aviation

0 to 163 clicks in 6 months

Coworking Pariscoworking-paris.frGoogleOffice broker

x92 clicks in 7 months

Guide Zanzibarguidezanzibar.comGoogleTravel