Sitemap, robots.txt and noindex: what each one does, and the mix-up to avoid

Three things on your website tell Google what to read and what to leave out of its results. Web people mention them as if everyone knew the difference. Most owners don't, and one common combination does the opposite of what was meant. We found that combination on our own site while writing this guide, and we show it below.
Written October 11, 2026, updated October 26, 2026, from the sources listed at the bottom. Where a rule comes from Google, Google's page is the final word. General information, not a promise about rankings.
The short answer
- A sitemap is a list of your pages that you hand to search engines. A small site often doesn't need one, and having one guarantees nothing.
- robots.txt asks crawlers not to visit certain addresses. Google says it is not a mechanism for keeping a web page out of Google.
- noindex is the one that keeps a page out of results. It is a small tag on the page itself.
- Don't use both on the same page. If robots.txt blocks a page, Google never sees its noindex tag, and the address can still show up in results.
- For anything private, use a sign-in. None of the three is a lock.
The three, side by side
| Thing | What it is | What it does | What it does not do |
|---|---|---|---|
| Sitemap | A file listing your pages | Tells search engines which pages exist | Guarantee that they are crawled or indexed |
| robots.txt | A small text file at the top of your site | Manages crawler traffic: asks crawlers to stay away from some addresses | Keep a page out of Google |
| noindex | A tag in a page's code | Has Google drop that page from its results | Work if robots.txt stops Google from reading the page |
Sitemap: do you even need one?
Google describes a sitemap as a file where you provide information about the pages, videos, and other files on your site. It says you might need one if your site is large, or if it is new and has few external links to it.
And it says you might not need one if your site is small, which it defines as about 500 pages or fewer, and comprehensively linked internally. That describes most local business websites. So if someone lists "sitemap submission" as a major line on a quote for a 12-page site, it is a small job, not a big one.
One sentence from Google to keep in mind: using a sitemap doesn't guarantee that all the items in your sitemap will be crawled and indexed. It is an invitation, not an order. A new site with few links pointing at it, like ours, is the case where it helps most.
robots.txt: a request, not a lock
Google's page says a robots.txt file is used primarily to manage crawler traffic to your site. Then it adds the line people miss: it is not a mechanism for keeping a web page out of Google. To keep a page out, Google says to use noindex or to password-protect the page.
Why not? Because blocking a visit is not the same as forgetting the address. If other pages link to a blocked page, Google says its URL can still appear in search results; the result just won't have a description. Google also notes that robots.txt rules may not be supported by all search engines, and that each crawler might interpret the rules differently.
noindex: the one that actually removes a page
noindex is a rule set with a tag in the page's code, or in what the server sends with the page. When Google reads it, it drops that page entirely from Google Search results. It is the right tool for a thank-you page, an internal search page, or a sample site you don't want mistaken for a real business.
The catch is in Google's own instructions: for noindex to work, the page must not be blocked by a robots.txt file. If it is blocked, the crawler never sees the noindex rule, and the page can still appear in results if other pages link to it. It also is not instant. Google has to visit the page again to see the tag, and says it may take months for it to revisit a page, depending on how important the page is.
Can you put noindex in robots.txt?
No, not for Google any more. Some sites used to write a "noindex" line in robots.txt. Google never documented it, and in July 2019 it announced it was "retiring all code that handles unsupported and unpublished rules (such as noindex) on September 1, 2019." A noindex line in robots.txt is now ignored. The options Google listed instead: a noindex tag on the page itself (or in the page's HTTP header), a 404 or 410 status for a page that is gone for good, a password, or a Disallow line in robots.txt, which stops crawling but, as above, does not reliably keep the address out of results.
Should a noindex page be in your sitemap?
No. Google's sitemap guide says to "include the URLs in your sitemap that you want to see in Google's search results." A noindex page is one you don't want there, so listing it sends two opposite signals: the sitemap invites Google to the page, and the tag tells it to leave the page out. Search Console then reports the page as submitted but marked noindex. The fix is to take it out of the sitemap and keep the tag. Our own build does this automatically: a page with noindex is never written into our sitemap.
The mix-up, and where we found it on our own site
The common mistake is doing both: adding noindex to a page and also blocking it in robots.txt, "to be safe". The block hides the tag. We checked our own site for it on October 11, 2026, and found it.
| What we looked at | What we found |
|---|---|
| Sitemap | 75 pages listed before this guide was added, rebuilt automatically every time the site is updated |
| Pages with a noindex tag | 10 pages (thank-you pages, form steps, the "not found" page) plus our example sites |
| The mix-up | Three of those pages and both groups of example sites were also blocked in robots.txt, so Google could not read their noindex tags |
| What we changed | We took those five lines out of robots.txt the same day. The noindex tags stay; now Google can read them |
| Still blocked in robots.txt | Our sign-in, owner and client screens and form addresses. Those are behind a sign-in, which is the method Google names for anything private |
We can't tell you yet whether any of those addresses had shown up in Google as a bare link: the site is new and we have too little search data to say. We fixed it because Google's instructions are plain, not because we measured harm.
What to check on your own site
- Look at your robots.txt. Type your address followed by /robots.txt. If you see "Disallow: /" on a line by itself, your whole site is asking search engines to stay away. It can be left over from when the site was being built.
- Ask which pages carry noindex, and whether any of them are also in robots.txt. If so, pick one: noindex to keep it out of results, or a sign-in to keep it private.
- Don't pay much for a sitemap. On a small site, many website systems generate it automatically.
- See what Google has. The Page indexing report in Search Console lists the pages it has left out and why.
Our Instant Website Score checks whether the page you give it asks Google not to list it, which is the costly version of this mistake. If you are changing page addresses as well, read redesigning or moving your website first.
Common questions
Does a small website need a sitemap?
Often not. Google says you might not need one if your site has about 500 pages or fewer and is comprehensively linked internally. It does no harm, and it helps a new site with few links.
Does robots.txt hide a page from Google?
No. Google says it is not a mechanism for keeping a web page out of Google, and that a blocked page's URL can still appear in search results.
How do I keep a page out of Google?
Use noindex on the page and make sure robots.txt does not block it, or put the page behind a sign-in.
How long does noindex take?
Google has to visit the page again to see it, and says it may take months for it to revisit a page. You can ask for a recrawl in Search Console.
Does noindex in robots.txt still work?
Not for Google. It stopped reading noindex lines in robots.txt on September 1, 2019. Put the noindex tag on the page instead, and leave the page crawlable.
Should I list a noindex page in my sitemap?
No. A sitemap should list the pages you want in Google's results. Take noindex pages out of it, or Search Console will flag them.
Is any of this a security measure?
No. All three are instructions that well-behaved crawlers follow. Anything private belongs behind a sign-in.
Checking what Google actually did with your pages? See Search Console "not indexed" reasons, and which to fix.
Sources
- Google Search Central: Learn about sitemaps
- Google Search Central: Introduction to robots.txt
- Google Search Central: Block Search indexing with noindex
- Google Search Central blog (July 2, 2019): a note on unsupported rules in robots.txt
- Google Search Central: build and submit a sitemap
Get your Instant Website Score Ask us a question
Or call (346) 472-0629.
Check your own business
- Free Growth Audit: type your web address and get a score out of 100 in about 30 seconds, with what to fix first. No sign-up.
- Listings check: Compare your name, phone and address on Google, Apple, Bing, Yelp and more, and see every mismatch.
Want our guides to show up first when you search Google? Pick us as a preferred source.
Add Digital Space Farmers as a preferred source on Google
Google spam policies for local business websites
Apple Maps listing: how to claim your business on Apple
Search Console "not indexed" reasons, and which to fix