Practical guideUpdated

Noindex in robots.txt: what to use instead

A Noindex: line in robots.txt does not work. Google never officially supported it and stopped honouring it entirely on 1 September 2019, and other major search engines do not support it either. To keep pages out of search results, use a robots meta tag with noindex in the page's HTML, or an X-Robots-Tag: noindex HTTP header for PDFs and other non-HTML files, and leave those URLs crawlable so search engines can see the directive.

Old tutorials still recommend putting Noindex rules in robots.txt, and some sites still rely on them. This page explains what changed, the correct alternatives for single pages, file types, and entire sites, and how to check that the noindex is being applied.

By , Founder, SerionFlow

What we measured ·

What Google shows for "noindex in robots.txt" right now

Method: Live Google results (United States, desktop, English) for "noindex in robots.txt" retrieved through DataForSEO's SERP API on 2026-10-22. Page types are our own classification of each ranking URL.

The top 9 organic results for "noindex in robots.txt" were 3 guides or explainers, 2 forum or community threads, 2 product or service pages, 1 official search-engine documentation, 1 list or comparison. The first three were webmasters.stackexchange.com, developers.google.com, stackoverflow.com. Community threads (webmasters.stackexchange.com, stackoverflow.com) ranked on page one, a sign searchers want first-hand answers, not only vendor pages.

Google showed an AI Overview for this query, citing 4 source domains including aioseo.com, developers.google.com, knowledge.hubspot.com, www.youtube.com. Pages that state the answer directly and early are the ones an Overview can quote.

People Also Ask listed: "Can robots.txt block indexing?"; "Is robots.txt still relevant?"; "What should be in my robots.txt file?"; "Is bypassing robots.txt illegal?". The sections below answer the ones within this page's scope.

Top organic results for "noindex in robots.txt", 2026-10-22
PositionDomainPage type
1webmasters.stackexchange.comForum or community thread
2developers.google.comOfficial search-engine documentation
3stackoverflow.comForum or community thread
4knowledge.hubspot.comProduct or service page
5developer.mozilla.orgGuide or explainer
6www.lumar.ioGuide or explainer
01

What changed in 2019

In July 2019 Google proposed formalising the Robots Exclusion Protocol as an internet standard and announced it would retire support for unpublished rules, including noindex, from 1 September 2019. The protocol was later published as RFC 9309 in 2022. robots.txt controls crawling, not indexing; the correct place for indexing directives is the page or its HTTP headers.

02

What to use instead

Pick the method that fits the content type.

Ways to noindex content
ContentMethodExample
A single HTML pageRobots meta tag in the head<meta name="robots" content="noindex">
One search engine onlyBot-specific meta tag<meta name="googlebot" content="noindex">
PDFs and other filesX-Robots-Tag HTTP headerX-Robots-Tag: noindex
A whole section or siteX-Robots-Tag set in server or host configHeader rule for /staging/*
Urgent temporary removalSearch Console Removals toolHides results for about six months
03

Why blocking and noindex conflict

If a URL is disallowed in robots.txt, Google does not fetch it and never sees a noindex tag or header on it. The URL can still be indexed from links, appearing without a description. To remove a page from search, allow crawling and serve noindex. Once it has dropped out, you can leave it noindexed, or block crawling afterwards if you also want to save crawl capacity, accepting that Google may keep the URL in its records.

04

Noindexing an entire site

For a staging or private site, password protection is the safest choice: nothing can be crawled or indexed. If the site must be public but unindexed, set an X-Robots-Tag: noindex header for every response at the server, CDN, or host level, which avoids editing every template. Most hosts support custom headers; on Vercel, a headers entry in vercel.json applies it. serionflow.com uses this approach to noindex its authenticated app routes.

05

Checking the directive is applied

Run URL Inspection's live test; the indexing section reports whether indexing is allowed and whether noindex was detected in the meta tag or header. Check response headers in the browser's network panel or with a command-line request. View the raw HTML for the meta tag, since JavaScript can add or remove it after load. Our robots.txt checker shows the rules in your live file, so leftover Noindex lines are easy to spot and remove. SerionFlow is the wrong tool for applying noindex across your existing site; set that in your HTML or server headers.

Clear answers

Frequently asked questions

Can robots.txt block indexing?

+

No. robots.txt can stop crawling, but blocked URLs can still be indexed from links. Use a noindex meta tag or header to prevent indexing.

Does Bing support noindex in robots.txt?

+

No. Bing, like Google, expects noindex in the robots meta tag or X-Robots-Tag header.

About the author

· Founder, SerionFlow

Shadrack builds SerionFlow's site research, page generation, and Search Console tooling, and runs the free tools these guides pair with. Search Console figures cited on these pages come from serionflow.com's own property.

Continue exploring

Related SerionFlow resources

More in Guides

All guides

Make the next move obvious

Let SerionFlow turn your market evidence into momentum.

Confirm the market, rank the opportunities that matter, create brand matched pages on your domain, and keep moving with controlled weekly intelligence.

Choose how SerionFlow uses cookies.

Essential cookies keep the site secure and working. Product analytics helps us improve reliability. Optional cookies help us remember preferences and improve campaigns. You can change optional cookies anytime in Cookie Settings.