Robots.txt vs Noindex: Which Tool for Which Job

Robots.txt controls crawling — whether Google’s robot may fetch a page. Noindex controls indexing — whether a fetched page may appear in search results. They answer different questions, and using the wrong one causes the single most common indexing mistake we see: if you want a page out of Google, use noindex (or a password), never robots.txt — because a page blocked in robots.txt can still show up in results, and Google can’t even see the noindex tag you put on it. Here’s which tool does which job, and how to check what your site is doing right now.

Good to know

Blocking a page in robots.txt does not remove it from Google. If other pages link to a blocked URL, Google can index the address itself without visiting it — which is why blocked pages sometimes appear in results with the note “No information is available for this page.” Google’s own robots.txt documentation says plainly that it is not a mechanism for keeping a page out of search.

What does robots.txt actually do?

Robots.txt is a plain-text file at the root of your site (yoursite.com/robots.txt) that tells crawlers which paths they may and may not fetch. Its real job is crawl management: keeping robots out of infinite calendar pages, faceted filter combinations, internal search results, and other URL swamps that waste crawling on pages with no search value. It’s a “do not enter” sign on the door — and like most signs, it works on the polite. Reputable crawlers obey it; scrapers ignore it. It provides traffic control, not security.

What does noindex actually do?

Noindex is an instruction inside the page — a <meta name="robots" content="noindex"> tag in the HTML, or an X-Robots-Tag HTTP header — that says: you may read this page, but don’t show it in results. Google honors it reliably, with one non-negotiable condition spelled out in Google’s noindex documentation: the crawler must be able to fetch the page to see the instruction. Noindex is the right tool for thank-you pages, internal search results you do serve, thin tag archives, staging leftovers, and any page that’s fine for humans but shouldn’t be a search destination.

Robots.txt decides whether Google may read a page. Noindex decides whether Google may show it. Combine them carelessly and Google can do neither — and remembers the page anyway.DevBytes Learn

The classic trap: blocking the page that carries the noindex

Here’s the sequence that burns people. A page is embarrassing you in search results, so you add noindex to it and block its folder in robots.txt, for good measure. The robots.txt block now stops Google from fetching the page — so Google never sees the noindex — so the URL stays in the index, sometimes for months, displayed as a bare link with no description. The fix is counterintuitive: unblock it, let Google crawl the page and read the noindex, and only consider re-blocking long after it has dropped out. One tool at a time, in the right order.

Which tool for which job?

The jobThe right toolWhy
Keep a page out of search resultsnoindexGoogle must crawl it to honor it — so don’t block it
Stop crawl waste on filter/search URLsrobots.txtCrawl control is exactly its job
Protect private or sensitive contentPassword / authenticationNeither tool is security; both are public suggestions
Remove a page fast in an emergencySearch Console removals + noindexThe removals tool hides it in about a day while noindex makes it stick
Retire a page permanently404/410 or a redirectPages that no longer exist shouldn’t need instructions

How do I check what my site is doing right now?

You don’t have to guess. Search Console’s URL Inspection tool shows you any page exactly as Google sees it: whether crawling is allowed, whether indexing is allowed, and which instruction is winning. Your robots.txt is public at yoursite.com/robots.txt, and a page’s noindex is visible in its source. Three checks, five minutes — and they resolve most “why is this page (not) in Google?” mysteries. For the full diagnostic method, see our guide to why your pages aren’t indexed.

Pro tip

WordPress owners: the most common self-inflicted wound is the innocent-looking “Discourage search engines from indexing this site” checkbox under Settings → Reading, left on after a site launch. It applies noindex site-wide. If a new site is invisible in Google, check that box before anything else — it takes ten seconds and it’s the culprit surprisingly often.

Quick answers

Will robots.txt keep my private files safe?

No — it’s a publicly readable file that politely asks well-behaved robots to stay out, and it conveniently lists the paths you consider sensitive. Anything genuinely private belongs behind authentication. Treat both robots.txt and noindex as visibility controls, never as security.

I noindexed a page. How fast does it leave Google?

Whenever Google next crawls the page and sees the tag — days for frequently-crawled pages, weeks for quiet ones. If it’s urgent, pair the noindex with Search Console’s removals tool, which hides the URL from results quickly while the noindex makes the removal permanent.

Should I block AI crawlers in robots.txt?

You can — major AI crawlers publish user-agent names and generally respect robots.txt. Whether you should is a business decision: blocking them keeps your content out of AI training and AI search answers alike, and for a local business trying to be found, AI answers are increasingly where customers ask. Don’t block what you want to be recommended by.

The bottom line

Robots.txt manages where crawlers spend their time; noindex manages what appears in results; passwords protect what’s actually private. Keep pages out of Google with noindex, keep robots out of URL swamps with robots.txt, and never point both at the same page at the same time. If your site’s crawling and indexing setup has grown mysterious — pages missing, pages showing that shouldn’t — untangling exactly this is bread-and-butter technical SEO work.

Want this handled for you? Start with a free search and conversion audit.