/ โ† Meta Tag Fixes / Noindex a page
In this guide
  1. What the noindex tag is
  2. How to add a noindex tag in HTML
  3. The robots.txt trap
  4. Noindex on WordPress, Shopify and Next.js
  5. How to remove pages already indexed in Google
  6. A worked example
  7. The fix, step by step
  8. Edge cases worth knowing
  9. Keeping noindex where you want it
  10. Questions and answers

What the noindex tag is

noindex is an instruction that tells search engines not to show a page in their results. You give it in one of two ways: a robots meta tag in the page's HTML, or an X-Robots-Tag HTTP response header. When Google crawls the page and sees it, it drops the page from its index, or never adds it in the first place. Bing and other major engines follow it too.

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

That single line in the <head> is all most pages need. Links on the page are still followed unless you also add nofollow, which you rarely want, because following the links helps Google find your other pages.

Typical pages to noindex are thank-you and order confirmation pages, internal search results, thin tag or author archives, login and account pages, test or duplicate landing pages, and printer versions. Pages that should never be public at all need a password instead, because noindex hides a page from results but not from anyone who has the link.

MethodStops crawlingKeeps it out of resultsUse it when
Meta robots noindexNoYes, once crawledAny HTML page
X-Robots-Tag: noindex headerNoYes, once crawledPDFs, images and other non-HTML files, or whole folders
robots.txt DisallowYesNo, the URL can still be listedSaving crawl effort, never for removal
Delete and return 404 or 410NoYes, once recrawledThe page should not exist any more
Password protectionYesYesPrivate content
Search Console RemovalsNoHidden for about six monthsUrgent, alongside a permanent method

How to add a noindex tag in HTML

Place the tag inside the <head> of the page you want removed, not in the body and not in a shared template that every page uses:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>Thank you for your order | Example Bakery</title>
  <meta name="robots" content="noindex">
</head>

Variations you may need:

Using the HTTP header instead

For files that have no HTML head, such as PDFs, send the instruction as a header. In nginx:

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

In Apache, in .htaccess or the virtual host, with mod_headers enabled:

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

Check the result with curl -sI https://example.com/files/price-list.pdf | grep -i x-robots-tag. The robots meta guide covers the other directives such as nosnippet and max-snippet.

The robots.txt trap

The most common reason a noindexed page stays in Google is that the same page is also blocked in robots.txt. Google respects the block, never fetches the page, and therefore never sees the noindex. The URL can remain listed, often with a note that no information is available for the page.

The order matters: allow crawling, add noindex, wait until Google has recrawled and dropped the page, and only then add a Disallow rule if you still want one. In most cases you do not need the Disallow at all. The noindex and disallow guide explains this in full.

โš ๏ธ Never add noindex to a template or layout shared by all pages unless you mean to remove the whole site. A noindex left in a theme after a redesign, or the WordPress setting that discourages search engines left ticked after launch, can empty a site from Google within weeks.

Noindex on WordPress, Shopify and Next.js

How to remove pages already indexed in Google

A noindex only takes effect when Google next crawls the page, which can take days for popular pages and weeks for obscure ones. If a page must disappear quickly, use the Removals tool in Search Console as well:

  1. Open Removals in the property, choose New request and enter the exact URL, or a prefix to cover a folder.
  2. Choose Temporarily remove URL. Google hides it from results for about six months.
  3. Within those six months, make the removal permanent with noindex, a 404 or 410, or a password. When the temporary block expires, the page comes back if nothing has changed.

The same tool has an option to clear the cached snippet without hiding the page, useful when you changed sensitive text but want the page to stay listed. For pages on other people's sites that have already changed or been deleted, Google offers a separate public tool for outdated content.

To confirm what Google knows, use URL Inspection on the page. Once it has recrawled, it reports that indexing is not allowed because of the noindex tag, and the page appears in the Pages report under Excluded by noindex tag. If a page lands there that should be indexed, see excluded by noindex tag.

A worked example

Example Bakery finds its order confirmation page, /checkout/thank-you, showing in Google for its brand name. Its robots.txt disallows /checkout/, and URL Inspection reports that the URL is blocked by robots.txt. The bakery removes the Disallow rule, adds <meta name="robots" content="noindex"> to the thank-you template, and confirms the tag in the live source with curl -s https://example.com/checkout/thank-you | grep -i robots. It requests a temporary removal for the URL so it disappears at once. Two weeks later URL Inspection reports the page as excluded by the noindex tag, so the temporary removal can safely expire.

The fix, step by step

Step 1

Decide noindex is the right tool

Confirm the page should stay reachable for visitors but not appear in search. If it should not exist at all, delete it and return 404 or 410. If it duplicates another page, a canonical or redirect may suit better. If it is private, protect it with a password. For thank-you pages, internal search, thin archives and test pages, noindex is the right choice, so carry on with the next step.

Step 2

Make sure crawling is allowed

Open your robots.txt and check that no Disallow rule matches the page. Then run URL Inspection on the URL in Search Console and confirm it does not report the page as blocked by robots.txt. Remove or narrow any rule that blocks it, because Google must fetch the page to read the noindex. You can add a Disallow later, once the page has dropped out, if you still want one.

Step 3

Add the robots meta tag

Add a robots meta tag with name="robots" and content="noindex" to the head of that page only. On WordPress use the Yoast or Rank Math advanced setting, on Shopify the seo.hidden metafield or a Liquid condition, and in Next.js the robots metadata with index: false. Make sure no other robots tag on the page says something different, and that the tag is not in a shared layout.

Step 4

Use a header for non-HTML files

For PDFs, images or other files without an HTML head, send X-Robots-Tag: noindex from the server. In nginx add an add_header line inside a matching location block; in Apache use Header set inside a FilesMatch block. Reload the server after testing the configuration, then confirm the header with curl -sI on one of the files. The header can also cover a whole folder at once.

Step 5

Check the live page

Purge your CDN and page cache, then fetch the page with curl -s and search the output for robots, or view the page source in the browser. You should see exactly one robots tag containing noindex. Run the live test in URL Inspection as well: it should report that indexing is not allowed because of a noindex tag. If it does not, a cache or plugin is still serving the old version.

Step 6

Request a temporary removal if urgent

If the page must vanish from results now, open Removals in Search Console, create a new request for the exact URL and choose temporary removal. Google hides it for about six months. This does not delete anything from the index permanently; the noindex you added does that once Google recrawls. Use the prefix option only when you are sure every URL under that path should be hidden.

Step 7

Remove it from your sitemap and links

Take the noindexed page out of your XML sitemap, because listing a page you do not want indexed sends a contradictory signal. Most SEO plugins do this automatically when you set noindex. Review internal links too: menu or footer links to a noindexed page are fine for visitors, but if the page is purely technical, such as a confirmation page, there is usually no need to link to it.

Step 8

Confirm Google has dropped it

After a week or two, run URL Inspection again. Once recrawled, it should say the page is excluded by the noindex tag, and the URL should appear in the Pages report under that reason. A site: search for the exact address should then return nothing. If the page is still listed after several weeks, recheck robots.txt and the live HTML, then request indexing so Google recrawls it sooner.

Edge cases worth knowing

Keeping noindex where you want it

Keep a short list of which page types are deliberately noindexed, and review the Excluded by noindex tag list in Search Console monthly, so an accidental noindex on an important page is caught early. After theme changes, plugin updates or a relaunch, check the source of your home page and a key service page for a robots tag. To check that a page has dropped out, or is still in, follow how to check if a page is indexed.

Questions and answers

1. What is a noindex tag?

A noindex tag is an instruction in a page's HTML, written as a robots meta tag with the value noindex, that tells search engines not to include that page in their results. The same instruction can be sent as an X-Robots-Tag HTTP header for files such as PDFs. Search engines must crawl the page to see it, and once they do, the page is dropped from the index or never added, while visitors with the link can still open it.

2. How do I add a noindex tag in HTML?

Add a meta tag with the name robots and the content noindex inside the head section of the page, before the closing head tag. It must go on that page only, not in a template shared by the whole site. On WordPress, Shopify and Next.js you normally set it through the SEO plugin, a metafield or page metadata instead of editing HTML. Afterwards, view the live page source to confirm the tag is there exactly once.

3. How do I remove indexed pages from Google?

Make the removal permanent first, by adding noindex, deleting the page so it returns 404 or 410, or putting it behind a password. Then, if speed matters, use the Removals tool in Google Search Console to hide the URL for about six months while Google recrawls. Do not block the page in robots.txt, because Google then cannot see the noindex. Check URL Inspection afterwards to confirm Google reports the page as excluded.

4. How long does noindex take to remove a page from Google?

It depends on how often Google crawls the page. Busy pages can drop out within a few days; rarely visited pages can take several weeks. You can speed it up by requesting indexing for the URL in Search Console, which prompts a recrawl, and by using a temporary removal to hide it immediately. If the page is still listed after a month, check that it is not blocked by robots.txt and that the live HTML still contains the tag.

5. Should I use noindex or robots.txt to hide a page?

Use noindex to keep a page out of search results, and robots.txt only to stop crawlers spending time on areas that do not matter. A robots.txt block does not remove a page from the index; it only stops Google reading the page, which also stops it seeing a noindex tag. If you combine them, add the noindex first, wait until the page has dropped out, and only then consider a Disallow rule.

6. Does noindex stop Google following links on the page?

Not on its own. A plain noindex keeps the page out of results but Google still follows its links, unless you also add nofollow. In practice that is usually what you want, because the links help Google reach your other pages. Google has said, though, that it crawls long-term noindexed pages less often and may treat their links as less important over time, so do not rely on them as the main route to other pages.

7. Is the Search Console Removals tool permanent?

No. A temporary removal hides a URL from Google results for about six months, after which it can reappear if nothing else has changed. It does not delete the page from Google's index or from your site. To make a removal last, combine it with a permanent method: a noindex tag, a 404 or 410 status, or password protection. The tool is useful for speed, for example when a page was published by mistake.

Check which pages carry noindex

The meta analyser reads the live robots meta tag and X-Robots-Tag header of each page, so you can confirm noindex is only where you intended before Google acts on it.

Open Meta Tag Fixes โ†’
๐Ÿ’ฌ Got a problem?
Related Guides: All Meta Tag Fixes  ·  Excluded by Noindex Tag  ·  Noindex and Disallow Conflicts  ·  Robots Meta Tags  ·  Check If a Page Is Indexed  ·  Learning Hub

About aiwebpageseo

aiwebpageseo.com is a data-driven SEO and AEO (Answer Engine Optimisation) platform providing a free suite of technical SEO tools. Rather than relying on AI-theorised assumptions, the platform analyses live URL performance, delivering objective diagnostics, page speed metrics, CLS debugging, and site crawl data alongside actionable technical tutorials.