How to noindex a page in WordPress

To noindex a page in WordPress, add a robots meta tag containing noindex to that page's head, leave the page crawlable in robots.txt, and wait for Google to recrawl it. With Hydrogen SEO, open the page's SEO Settings sheet, switch on No Index in the Robots Meta section and update the page.

noindex is for pages that are part of your site but should not appear in search results: thank-you pages, internal tools, members-only landing pages. If Google is showing a page as noindexed and you did not mean it to be, you want page set to noindex instead.

Step by step

1. Check that noindex is the right tool

Noindex removes a live page from results. It is the wrong tool for a few look-alike jobs:

  • The page is a duplicate of another page. Use a canonical URL so the signals move to the main version.
  • The page moved. Use a 301 redirect.
  • The page should not exist. Delete it and let it return a 404.
  • You want bots to stop fetching it. That is robots.txt, and it does not remove anything from the index.

2. Noindex one page with Hydrogen SEO

  1. Open the page or post in the editor.
  2. Open the SEO Settings sheet.
  3. In Robots Meta, switch on No Index.
  4. Leave No Follow off in most cases, so Google still follows the links on the page.
  5. Click Update. Nothing changes on the live page until you save.

The same switches exist for categories, tags and other terms: open the term's edit screen and click Hydrogen SEO → Edit SEO settings.

3. Noindex a whole post type or taxonomy

When every item of a type should stay out, set it once instead of editing each post. Open Hydrogen SEO → Robots and switch on Noindex for that row in the Post Types or Taxonomies table. Changes save automatically, and a per-post setting still overrides the default.

Some pages are already handled: author archives, internal search results and the 404 page always get noindex, follow. For tag and category archives specifically, see how to noindex tag and category archives.

4. Or add noindex with code

On a site with no SEO plugin, WordPress core prints the robots meta tag through the wp_robots filter (WordPress 5.7 and later). Add this to a child theme or snippets plugin, changing the page slug:

php
add_filter( 'wp_robots', function ( $robots ) {
    if ( is_page( 'thank-you' ) ) {
        $robots['noindex'] = true;
    }
    return $robots;
} );

Files such as PDFs have no HTML head, so they need an X-Robots-Tag: noindex HTTP header set in your server configuration instead. See X-Robots-Tag.

5. Keep the page crawlable

Open yoursite.com/robots.txt and make sure no Disallow line matches the page's path. Google has to fetch the page to see the noindex tag. A page that is blocked and noindexed at the same time can stay in results indefinitely, listed without a description.

6. Confirm the tag in the page source

Log out or use a private window, open the page and view the source. Search for name="robots". You should see a tag with noindex in its content, for example:

html
<meta name="robots" content="noindex, follow">

If it is missing, clear your page cache and check again. If you see two robots tags, two SEO plugins are active at once.

7. Ask Google to recrawl

Paste the URL into Search Console's URL Inspection and click Request indexing. That prompts a recrawl, and the page drops out once Google sees the tag. To hide it right away while you wait, use Indexing → Removals, which hides a URL from results for about six months. The noindex tag is what keeps it out permanently.

Check it worked

After the recrawl, URL Inspection shows the page as not indexed, with Excluded by 'noindex' tag as the reason. The same URL appears in that group in the Pages report. That is the expected result here. If you see pages there you did not mean to noindex, follow fix excluded by noindex tag.

Common mistakes

  • Blocking the page in robots.txt as well. Covered above, and still the most common reason noindex "does not work".
  • Setting noindex and a canonical to another page. One says "keep this out", the other says "index that one instead". Pick one.
  • Leaving Discourage search engines ticked on a live site. Settings → Reading → Discourage search engines noindexes every page. It is meant for staging and new builds only.
  • Noindexing pages you want traffic from because they look thin. Improve or merge them instead.

Common questions

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

It works the next time Google crawls the page, which can be days or a few weeks. Requesting indexing in URL Inspection usually speeds up that crawl.

What is the difference between noindex and nofollow?

noindex keeps the page itself out of results. nofollow tells search engines not to follow the links on the page. Most pages you noindex should still be followed.

Does a noindexed page still appear in my sitemap?

Not with Hydrogen SEO. Noindexed content is left out of the sitemap automatically, so the two do not contradict each other.

Is noindex enough to keep a page private?

No. Anyone with the link can still open it. Use a password or a login for content that must stay private.