Robots.txt vs Noindex: Which One to Use
The short answer
Robots.txt tells crawlers which pages they may fetch. Noindex tells search engines not to list a page in results. To keep a page out of Google, use noindex and leave the page open to crawling. A page blocked in robots.txt can still be listed, and Google cannot see a noindex on a page it may not fetch.
Key takeaways
- Robots.txt controls whether Google fetches a page. Noindex controls whether Google lists it. One cannot do the other's job.
- Google says robots.txt is not a way to keep a page out of its results.
- Noindex only works when Google can fetch the page, so never block the same page in robots.txt.
- Neither one is security. Anything private needs a password.
In this guide
This guide is for owners who want a page kept out of Google, or who have been told that part of their site is "blocked". It sets out robots.txt vs noindex in plain words: what each one does, how you would notice that the wrong one is in use, and what to ask your developer. Checking these settings is part of our technical SEO service.
What is robots.txt, and what is noindex?
They are two separate instructions to search engines. One is about fetching a page and the other is about listing it. Search engines fetch pages with programs called crawlers. Google's is called Googlebot.
Robots.txt
A plain text file at the top level of a website, found by adding robots.txt after the domain name, that tells crawlers which addresses they may fetch. Google says it is used mainly to manage crawler traffic to a site.
Noindex
A rule placed on a single page, in the page's code or in the response the server sends with it, that tells search engines not to list that page. Google says a page with noindex is dropped from its results entirely, even when other sites link to it.
Robots.txt vs noindex: what is the difference?
Robots.txt stops Google from fetching a page. Noindex lets Google fetch the page and tells it not to list it. Only noindex keeps a page out of search results. A blocking line in robots.txt begins with the word Disallow, which is why you will also see this comparison written as noindex vs disallow.
| What to compare | Robots.txt | Noindex |
|---|---|---|
| What it controls | Whether crawlers fetch the page | Whether the page is listed in search results |
| Where it lives | One file for the whole site | On each page, as a tag or a response header |
| Can the page still show on Google? | Yes. Google says the address can appear, without a description, when other pages link to it | No. Google drops the page once it has fetched it and read the rule |
| Does Google still fetch the page? | No | Yes. It has to, in order to read the rule |
| What it is good for | Keeping crawlers out of areas with no search value, such as the filter combinations in an online store | Pages visitors need and searchers do not, such as a thank-you page or a printable price list |
Google's introduction to robots.txt says the file is not a mechanism for keeping a web page out of Google. To do that, it says to block indexing with noindex or to password-protect the page.
Source1Google Search Central
How would you notice that the wrong one is in use?
Usually from a search result that looks wrong, or from a reason shown in Google Search Console, the free tool where Google reports on your site. The names in quotation marks come from Google's help page for the Page indexing report.
| What you see | What it usually means | What to ask your developer |
|---|---|---|
| A page of yours shows on Google with no description under its title | The page is blocked in robots.txt and listed anyway. Search Console calls this "Indexed, though blocked by robots.txt". | Do we want this page on Google? If not, remove the block and add noindex. |
| A page you want customers to find is missing from Google | A noindex was left on it, often from when the site was being built. Search Console shows "URL marked 'noindex'". | Which pages carry noindex, and is each one meant to? |
| You added noindex months ago and the page is still on Google | Google cannot fetch the page to read the rule, or has not come back to it yet. | Is this page also blocked in robots.txt? Can we ask Google to fetch it again? |
| The whole site vanished from Google after a launch | A site-wide block from the build is still on: either Disallow: / in robots.txt or noindex on every page. | Was the block we used during the build removed? |
If the whole site is missing, work through why a website is not showing up on Google first.
Which one should you use?
Start from what you want to happen to the page, then pick the tool.
The right tool for each job
- A public page should stay live and stay out of GoogleNoindex on the page, with crawling allowed
- A PDF, image or video file should stay out of GoogleNoindex sent as a response header (the X-Robots-Tag)
- Crawlers spend their time on filter and sort pages nobody searches forA Disallow rule in robots.txt
- The content is privateA password. Neither robots.txt nor noindex protects it
- A page must leave Google's results todayThe Removals tool in Search Console, then a lasting fix
- The page is gone for goodLet it return a 404 or 410 status
Two cautions. Robots.txt is a public file. The standard that defines it says its rules are not a form of access authorization and that listing a path makes it discoverable, so never list private folders there. And the Removals tool is temporary: Google says a request lasts about six months. For pages that are gone, see 301 vs 302 redirects and the status codes that matter.
What is the X-Robots-Tag?
The X-Robots-Tag is the noindex rule sent by the server along with a file, instead of written into a page's code. Google says it can be used for files that are not web pages, such as PDFs, videos and images.
<!-- In the page's code: fetch allowed, listing not allowed -->
<meta name="robots" content="noindex">
<!-- The same rule as a response header, for a PDF or other file -->
X-Robots-Tag: noindexThe tag and the header accept other rules too, such as nosnippet, which hides the text preview under a result. Where rules conflict, Google applies the more restrictive one.
How do you take a page out of Google without a conflict?
Let Google read the noindex before you do anything else. The order matters.
Removing a live page from Google
- Decide the final state
Live but hidden from search, gone for good, or private. Hidden means noindex. Gone means a 404 or 410. Private means a password.
- Check that robots.txt does not block the page
Google says that for noindex to be effective, the page must not be blocked by robots.txt. If a Disallow rule covers the page, remove it.
- Add noindex
Use the search settings in your website platform, or ask your developer to add the tag. For a PDF or another file, ask for the response header.
- Ask Google to fetch the page again
Google says it may take months for Googlebot to revisit a page by itself. Inspect the address in Search Console and request indexing to bring that forward. If the page must disappear at once, use the Removals tool as well.
- Confirm, and leave the page crawlable
Inspect the address again later. When Search Console reports the noindex, the job is done. Do not add a robots.txt block afterwards, or Google can no longer read the rule.
What should your developer check in the robots.txt file?
Mistakes in robots.txt are usually about scope: a rule that covers more of the site than intended. These points come from Google's own description of how it reads the file.
Robots.txt checks for the person making the change
- Place and scopeThe file sits at the top level of the host. Google applies it only to the host, protocol and port it is served from, so a shop on its own subdomain needs its own file.
- Supported linesGoogle reads four fields: user-agent, allow, disallow and sitemap. It does not support crawl-delay. Paths are case-sensitive.
- Which rule winsGoogle uses the most specific matching rule, judged by the length of its path. When two rules conflict, it uses the less restrictive one.
- What the file itself returnsIf the file returns a not-found error, Google crawls as if there were no restrictions. If it returns a server error, Google pauses crawling of the site at first, then relies on the last good copy it holds for up to 30 days.
- Delay and sizeGoogle generally keeps a copy of the file for up to 24 hours, so a fix is not instant. It ignores anything past 500 KiB.
- Files the page needsGoogle warns against blocking script, style or image files when their absence makes the page harder for its crawler to understand.
A review of these settings across a whole site is part of Taskcover's one-time Technical SEO Audit, which starts from $2,500. Building the fixes is priced separately unless it is part of your plan. See the pricing page.
Related serviceTechnical SEO: the right pages in Google, the rest kept out
We check what your site tells Google to fetch and to list, and write each fix as a clear task for your developer.
See the serviceQuestions people ask about robots.txt and noindex
Does every website need a robots.txt file?
No. Google says crawlers assume they may fetch anything that is not disallowed, and it treats a missing file as no restrictions. A small site can leave the file out, or keep a short one that points to its sitemap.
Can I put noindex in my robots.txt file?
No. Google says it does not support a noindex rule inside robots.txt. Put noindex on the page itself, as a tag in the page's code or as a response header.
What is the difference between noindex and nofollow?
Noindex tells search engines not to list the page. Nofollow tells Google not to follow the links on the page. They can be used together, and Google also accepts the single word none for both.
How do I add noindex if I cannot edit my website's code?
Look in your website platform's settings. Google notes that with a platform such as Wix, WordPress or Blogger you might not be able to edit the code directly, and that the platform might have a search engine settings page that sets the tag for you.
Does robots.txt stop AI tools such as ChatGPT from reading my site?
Only if the company behind the tool chooses to respect it. Google says robots.txt rules may not be supported by every crawler and that it is up to the crawler to obey them. Each AI company names its own crawlers, so the rules differ. Should you block AI crawlers? covers them.
Will blocking pages in robots.txt make Google crawl my other pages more?
Usually not. Google says freed-up crawling does not move to your other pages unless it is already hitting the limit of what your server can take. What crawl budget is explains who needs to think about this.
Not sure what your site is telling Google?
Send us your website and we will show you which pages Google is blocked from and which it is told not to list, at no cost.
The authors
Who wrote and checked this guide

Written by
Jamiez Nguyen
Founder & CEO
Jamiez Nguyen founded Taskcover and leads strategy and client growth. He started it in 2017 as a team doing search work behind the scenes for other agencies, then opened it to businesses in the USA, Canada and Australia.

Reviewed by
John Edward
CTO
John Edward leads the technical side of Taskcover: how sites are built, how fast they load, and how search engines read them.
Updated Fact-checked About the people at Taskcover
Sources
Where the facts in this guide come from
Facts last checked on October 12, 2026.
- 1Introduction to robots.txtGoogle Search CentralChecked on October 12, 2026
- 2Block Search indexing with noindexGoogle Search CentralChecked on October 12, 2026
- 3Robots meta tag, data-nosnippet, and X-Robots-Tag specificationsGoogle Search CentralChecked on October 12, 2026
- 4How to write and submit a robots.txt fileGoogle Search CentralChecked on October 12, 2026
- 5How Google interprets the robots.txt specificationGoogle Crawling InfrastructureChecked on October 12, 2026
- 6RFC 9309: Robots Exclusion ProtocolIETFChecked on October 12, 2026
- 7Page indexing reportGoogle Search Console HelpChecked on October 12, 2026
- 8Removals and SafeSearch reports toolGoogle Search Console HelpChecked on October 12, 2026
- 9Managing crawling of faceted navigation URLsGoogle Crawling InfrastructureChecked on October 12, 2026
- 10Optimize your crawl budgetGoogle Crawling InfrastructureChecked on October 12, 2026
