SEO

How to Keep a Page Out of Google: noindex, robots.txt or a Password?

Google updated its 'Control what you share' page on 21 October 2026. Why robots.txt is the wrong tool for hiding a page, how noindex works, the trap that cancels it, when a password or deletion is safer, and how to fix a page that is already showing in Google.

zabil

7 menit membaca
Hand-painted keep out sign standing in front of a closed metal shutter

Most advice about Google is about getting pages in. Sometimes you need the opposite: a thank-you page, a draft for a client, a price list for trade customers, or a pile of low-quality pages that visitors created. On 21 October 2026 Google updated its help page “Control what you share with Google Search”, which lists the main ways it supports for keeping content out. This guide explains which method fits which job, and the one mistake Google keeps warning about, as of 14 November 2026.

Three reasons to keep content out of Google

Google gives three reasons to block content from Search:

  • To restrict data. You may host data that you want to show only to users who are already on your site.
  • To hide content of less value. If your site lets users create content, some of it “might be low quality or even spam”, and Google says “Allowing indexing of such content may have a negative effect on your site’s ranking in Google’s search results.” Our guide to comment spam covers that case.
  • To help Google focus on important content. This one is aimed at very large sites, “over hundreds of thousands of URLs”, so it rarely applies to a small business website.

The mistake: using robots.txt to hide a page

A robots.txt file feels like the natural tool, and it is not. Google’s introduction says a robots.txt file is used mainly to avoid overloading your site with requests, and “it is not a mechanism for keeping a web page out of Google. To keep a web page out of Google, block indexing with noindex or password-protect the page.”

The reason is how Google finds pages. “If other pages point to your page with descriptive text, Google could still index the URL without visiting the page.” A page blocked this way can still appear, because “its URL can still appear in search results, but the search result won’t have a description.” Google’s removal page repeats the warning in one line: “Don’t use robots.txt as a way to block your page.”

noindex: public by link, absent from search

The noindex rule is the standard way to tell Google not to list a page. Google’s page says that once Googlebot crawls the page and reads the rule, “Google will drop that page entirely from Google Search results, regardless of whether other sites link to it.” People who have the link can still visit it.

You can set the rule in two ways, and they have the same effect:

  • A meta tag in the page’s head: <meta name="robots" content="noindex">.
  • An HTTP header, X-Robots-Tag: noindex, which can also be used for non-HTML files such as PDFs, video files and image files.

Google adds that “Specifying the noindex rule in the robots.txt file is not supported by Google.” If you use a CMS, Google says it “might have a search engine settings page or some other mechanism to tell search engines about meta tags”, so look for a per-page setting before touching code.

The trap that breaks noindex

Google’s wording is direct: “For the noindex rule to be effective, the page or resource must not be blocked by a robots.txt file, and it has to be otherwise accessible to the crawler.” If the page is blocked, “the crawler will never see the noindex rule, and the page can still appear in search results.”

So blocking a page in robots.txt and adding noindex at the same time cancels the noindex. Google warns that combining crawling and indexing rules “might cause some rules to counteract other rules.” Use one clear method per page.

Passwords and deletion are stronger

For sensitive material, Google treats two methods as stronger than noindex. A password keeps out anyone without access: “If you have confidential or private content on your site, you need to password protect it to ensure only authorized users can access it.” Deletion is stronger still: “Removing content from your site is the best way to ensure that it won’t appear in Google Search and anywhere else on the Internet.”

The reason is that noindex asks politely. Google’s removal page says a noindex tag “only blocks your page from showing up in Google search results”, and users and other search engines that do not support it “can still access your page.”

A quick chooser

This is our reading of Google’s table:

  • Private or confidential material: password-protect it, or remove it.
  • A public page that should not be listed, such as a thank-you page: noindex.
  • A PDF or other non-HTML file: an X-Robots-Tag: noindex header.
  • Images and video: Google lists robots.txt as applicable here, because “Google only indexes images and videos that Googlebot is allowed to crawl.”
  • Your own WordPress search results: nothing to do. We checked WordPress 7.1.4 core, which hooks wp_robots_noindex_search by default and so adds noindex to internal search result pages.

If a page is already showing in Google

  1. Decide whether to delete the page, protect it or noindex it.
  2. Check your robots.txt does not block it. If it does, remove that rule so Google can see the tag.
  3. Add the noindex rule, then use Search Console’s URL Inspection tool to see the HTML Googlebot received.
  4. Be patient. Google says “Depending on the importance of the page on the internet, it may take months for Googlebot to revisit a page”, and you can ask for a recrawl in the same tool.
  5. If it must disappear quickly, use the Removals tool. Google says it can remove a page from search results “within a day”, but “Requests made in the Removals tool last for about 6 months”, so follow it with deletion, a password or noindex.
  6. Watch the Page indexing report, which shows pages where Googlebot found a noindex rule.

Do not hide your whole site by accident

WordPress has a site-wide switch under Settings, Reading: “Discourage search engines from indexing this site”. Since version 5.3 it adds noindex,nofollow to the site’s pages, and WordPress notes that “it is up to search engines to honor your request.” In our view a staging copy is the place for it. On a live site that was switched on by mistake, pages may drop out of results, so it is an early check in our guide on why a website is not showing on Google.

Controlling how a page appears, not whether it appears

Two other rules change presentation. The nosnippet rule stops text snippets and video previews and, Google says, “will also prevent the content from being used as a direct input for AI Overviews and AI Mode.” The data-nosnippet attribute does the same for a single section. When rules conflict, “the more restrictive rule applies.” For titles and descriptions, see our guide to title tags and meta descriptions, and for AI crawlers, our guide on blocking them in robots.txt.

Google’s table also lists the Search generative AI control in Search Console, and opting out of specific Google properties, “such as Google Shopping, Google Hotels, and vacation rentals”, which villa and hotel owners may care about.

If you are unsure whether a page should be public, tell us about your business and we will check how it appears in search.

Sources: Google Search Central, Control what you share with Google Search (last updated 21 October 2026); Block Search indexing with noindex and Introduction to robots.txt (both last updated 10 December 2025); Robots meta tag, data-nosnippet, and X-Robots-Tag specifications (last updated 24 March 2026); Remove a page hosted on your site from Google (last updated 10 December 2025); WordPress.org, Settings Reading screen; WordPress 7.1.4 core source (robots-template.php), checked 14 November 2026.

Baca lebih lanjut

Artikel terkait.

Tinggalkan komentar

Your email address will not be published. Required fields are marked *