Article
noindex vs robots.txt: which keeps a page out of Google
Short answer
If you want a page out of Google’s results, use noindex, not robots.txt. Google says robots.txt is mainly there to stop crawlers overloading your site and “is not a mechanism for keeping a web page out of Google” (Google Search Central). The classic mistake is using both on the same page, which stops Google from ever seeing the noindex.
The two get mixed up because they sit next to each other in most SEO plugins. They do different jobs, and Google’s docs are blunt about which job is which.
The two tools, side by side
| robots.txt Disallow | noindex | |
|---|---|---|
| What it controls | Crawling: which URLs a crawler can access (Google Search Central) | Indexing: Google drops the page from results once it sees the rule (Google Search Central) |
| Where it lives | One file at the root of your site | A meta tag in the page or an X-Robots-Tag HTTP header (Google Search Central) |
| Can the URL still show in Google? | Yes, if other pages link to it, usually without a description (Google Search Central) | No, once Google crawls the page and reads the rule (Google Search Central) |
| Works on PDFs and images? | Yes, for crawling | Yes, through the X-Robots-Tag header (Google Search Central) |
| Needs Google to crawl the page? | No | Yes (Google Search Central) |
That last row is the one people miss.
Why a blocked page can still show up
A Disallow line tells Googlebot not to fetch a URL. It doesn’t tell Google to forget the URL exists. Google’s robots.txt guide says that if other pages point to your page with descriptive text, Google can still index the URL without visiting the page (Google Search Central). In that case the result appears without a description (Google Search Central).
Google adds that the URL and “potentially, other publicly available information such as anchor text” can still show in results (Google Search Central). So a Disallow line can leave you with a bare listing of a page you meant to hide (which is arguably worse than the page itself).
Robots.txt has a second limit. Google says the rules can’t force crawler behavior, and while Googlebot and other respectable crawlers obey them, “other crawlers might not” (Google Search Central). For anything private, Google points you to password protection instead (Google Search Central).
How noindex works
The noindex rule goes in a meta tag or an HTTP response header, and Google says both have the same effect (Google Search Central). When Googlebot crawls the page and reads it, Google will “drop that page entirely from Google Search results, regardless of whether other sites link to it” (Google Search Central).
<!-- In the <head> of the page -->
<meta name="robots" content="noindex">A few details from Google’s spec:
- To target only Google, use
googlebotas the meta name instead ofrobots(Google Search Central). - For PDFs, images and other non-HTML files, use the
X-Robots-Tagresponse header (Google Search Central). - Google says it will respect robots meta tags even when they sit in the body rather than the head (Google Search Central).
- A noindex line inside robots.txt does nothing. Google says that “is not supported by Google” (Google Search Central).
- The value
noneis the same asnoindex, nofollow(Google Search Central).
If you’re on Wix, WordPress or Blogger, you may not edit the HTML at all. Google notes your CMS might offer a search engine settings page instead (Google Search Central).
The mistake that breaks both
Here’s the trap. You add noindex to a page, then also block it in robots.txt to be extra sure. Google’s noindex guide says that for the rule to work, the page “must not be blocked by a robots.txt file” (Google Search Central). If it is blocked, “the crawler will never see the noindex rule” and the page can still appear in results (Google Search Central).
Watch out
Watch out: the robots meta tag spec makes the same point in general terms. These settings can be read and followed only if crawlers are allowed to access the pages that carry them (Google Search Central). Belt and braces here means neither works.
Which one to use
- You want a page out of Google’s results. Use noindex and leave the page crawlable (Google Search Central).
- The page is private. Put it behind a password. Google recommends password protection for anything you need kept from crawlers (Google Search Central).
- You want to save crawling on junk URLs (sorted duplicates, endless filter pages). Robots.txt is the tool built for managing crawler traffic (Google Search Central).
- You want an image, video or audio file kept out of results. Google says robots.txt can do this for media files (Google Search Central).
- The page is gone for good. Remove it. Google lists removing the page entirely as one way to keep a URL out of results (Google Search Central).
When noindex seems not to work
Google says a page that still shows up after you add noindex probably hasn’t been crawled since the change, and that “it may take months for Googlebot to revisit a page” depending on how important the page is (Google Search Central). You can ask for a recrawl with the URL Inspection tool (Google Search Central). If you need it gone fast, Google points you to its removals documentation (Google Search Central).
Note
Note: Google also warns that other search engines might read noindex differently, so a page could still appear elsewhere (Google Search Central). Our read: check Bing separately if it matters to you.
Key takeaway
What to do next
Open your robots.txt and list every Disallow line. For each, ask whether you wanted the page uncrawled or unlisted. If unlisted, remove the Disallow and add noindex. Then run the URL Inspection tool on two or three of those pages to confirm Google can fetch them and sees the tag. Read how Be In GEO works for how we log changes like this.
Get the worksheet
Want to see which sites AI answers cite for the questions your customers ask? Grab the free worksheet at beingeo.com/checklist. You’ll also get short emails with each new teardown.
FAQ
Can I put noindex in robots.txt?
No. Google says specifying noindex in robots.txt is not supported (Google Search Central).
Does robots.txt remove a page that’s already indexed?
Not reliably. A blocked URL can still appear in results, without a description, if other pages link to it (Google Search Central).
Should I use noindex on a page I want hidden from everyone?
Use a password for that. Google recommends password protection for private files (Google Search Central).