Sub topic 6
Blocking crawling is not the same as blocking indexing
This chapter assumes you can read a basic robots.txt file with User-agent and Disallow lines. It also assumes you know that a crawler fetches pages and a search engine indexes them. The goal is to choose the right tool when you want a page kept out of search results.
Two different controls
A robots.txt Disallow rule tells a crawler not to request a URL. It says nothing about whether the URL may appear in search results. A noindex instruction tells a search engine not to list a page. To read that instruction, the crawler must fetch the page.
| Goal | Tool | Crawler must fetch the page? |
|---|---|---|
| Stop requests to a URL (save server load, skip junk) | `Disallow` in robots.txt | No |
| Keep a page out of search results | `noindex` | Yes |
What happens to a blocked URL
If other pages link to a URL you disallowed, a search engine can still index the bare URL. It knows the address and the link text, but it has never seen the content. The result usually appears with no description, or with a note that no information is available.
Suppose you disallow /thank-you/ and also add noindex to that page. The crawler never fetches the page, so it never sees the noindex. The URL can stay in the index.
How to use noindex
You can send noindex in two ways. For HTML pages, add a meta tag in the <head>:
<meta name="robots" content="noindex">For non-HTML files such as PDFs, send an HTTP response header instead:
X-Robots-Tag: noindexBoth methods work only if the URL is not blocked in robots.txt. To remove an already indexed page, first allow crawling, add noindex, and wait until the crawler has revisited the page. Once the page has dropped out of the results, you may choose to disallow it.
Choosing between them
- Use
Disallowfor URLs that waste crawl effort and that you do not mind seeing listed as bare URLs. Examples are internal search results and session-ID URLs. - Use
noindexfor pages that can be fetched but should not appear in results. Examples are thank-you pages and thin tag archives. - Use neither for private content. Use authentication instead, because both controls are requests that a crawler may or may not honor.
Common errors
- Adding
Disallow: /old-pageto remove a page from search. The page can remain listed. - Putting
noindexinside robots.txt. Google does not support it there, so the line has no effect. - Blocking CSS or JavaScript folders. The crawler then cannot render pages correctly.
- Forgetting that a
noindexheader on a whole site, left over from staging, can remove every page from results.
Exercise
A page at /promo-2025/ is still in search results. You added a noindex meta tag and also disallowed /promo-2025/ in robots.txt. The page stays listed. Why, and what do you change?
Show answer
The Disallow rule stops the crawler from fetching the page, so it never sees the noindex tag, and the URL can stay indexed from links. Remove the Disallow rule so the crawler can fetch the page and read noindex. After the page drops out of the results, you may add the Disallow back if you want to stop crawling.