How to Noindex a Page and Remove It from Google
Sometimes a page needs to stay on your site but stay out of Google: a thank-you page, an internal search result, a thin archive or a landing page made for one campaign. The noindex instruction does exactly that, but it only works if search engines can crawl the page and read it, and it takes effect on Google's timetable, not yours. Many attempts fail because the page is also blocked in robots.txt, or because the tag ends up in a shared template. This guide explains what the noindex tag is, how to add it in HTML, as an HTTP header and in WordPress, Shopify and Next.js, and how to remove pages that are already indexed using the Removals tool in Search Console.
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.
| Method | Stops crawling | Keeps it out of results | Use it when |
|---|---|---|---|
Meta robots noindex | No | Yes, once crawled | Any HTML page |
X-Robots-Tag: noindex header | No | Yes, once crawled | PDFs, images and other non-HTML files, or whole folders |
robots.txt Disallow | Yes | No, the URL can still be listed | Saving crawl effort, never for removal |
| Delete and return 404 or 410 | No | Yes, once recrawled | The page should not exist any more |
| Password protection | Yes | Yes | Private content |
| Search Console Removals | No | Hidden for about six months | Urgent, 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:
<meta name="robots" content="noindex, nofollow">also tells crawlers not to follow links on the page.<meta name="googlebot" content="noindex">applies to Google only; other engines ignore it.- Only one robots tag is needed. If a page has two conflicting ones, Google applies the most restrictive, so a stray
noindexfrom a plugin wins over yourindex.
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.
Noindex on WordPress, Shopify and Next.js
- WordPress with Yoast. Edit the page, open the Yoast panel, go to Advanced and set the option for allowing search engines to show the page in results to No. Yoast also removes the page from its sitemap.
- WordPress with Rank Math. In the Rank Math panel, open Advanced and tick No Index under Robots Meta.
- WordPress site-wide. Settings, then Reading, then the option to discourage search engines adds noindex to every page. Use it only on staging. See meta tags in WordPress.
- Shopify. Shopify supports a metafield named
seo.hidden; setting it to 1 on a product, collection, page or article adds noindex and removes it from the sitemap. Alternatively add a condition intheme.liquid, for example{% if handle == 'thank-you' %}<meta name="robots" content="noindex">{% endif %}. See meta tags in Shopify. - Next.js App Router. Export metadata from the page:
export const metadata = { robots: { index: false } };. See meta tags in 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:
- Open Removals in the property, choose New request and enter the exact URL, or a prefix to cover a folder.
- Choose Temporarily remove URL. Google hides it from results for about six months.
- 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
- JavaScript-added noindex. Google can see a robots tag added by JavaScript after rendering, but if the original HTML says noindex, Google may not render the page at all, so a script cannot reliably remove it. Put the correct value in the server HTML.
- Noindex and canonical together. Pointing a canonical at another page while also saying noindex sends mixed signals. Choose one: canonical for duplicates, noindex for pages that should not appear.
- Long-term noindex pages. Google tends to crawl noindexed pages less often over time and may eventually stop following their links, so do not rely on a noindexed page as the only route to other pages.
- A hidden header. An
X-Robots-Tagheader applies to HTML pages too. If a page has no robots meta tag but still shows as excluded by noindex, check the response headers withcurl -sI; a server rule, security plugin or CDN setting may be adding the header without you knowing. - Caching. A CDN or page cache can keep serving the old HTML without the tag. Purge it and check the live response.
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.
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.
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 โ