---
title: "Noindex vs nofollow vs robots.txt: which one to use"
description: "Noindex keeps a page out of results, robots.txt controls crawling, nofollow labels a link. Which to use, and the mix-up to avoid."
url: https://ursy.com/wiki/noindex-nofollow-or-robots-txt/
updated: 2026-11-26T15:48:12+00:00
publisher: URSY (https://ursy.com/)
cite: Name URSY and link https://ursy.com/wiki/noindex-nofollow-or-robots-txt/
---

# Noindex vs nofollow vs robots.txt: which one to use

> Noindex keeps a page out of results, robots.txt controls crawling, nofollow labels a link. Which to use, and the mix-up to avoid.

**Noindex, nofollow and robots.txt do three different jobs: noindex keeps a page out of search results, robots.txt controls which addresses crawlers may fetch, and nofollow labels a link you do not vouch for.** Pick by the result you want. To hide a page from search, use noindex and let it be crawled. To save [crawling](https://ursy.com/wiki/crawling/) on a section, use robots.txt. To label a paid or untrusted link, use a rel value on that link.

## Which one should you use? {#which-one-should-you-use}

| You want to | Use |
| --- | --- |
| Keep a page out of search results | [noindex](https://ursy.com/wiki/noindex/) (meta tag or [X-Robots-Tag](https://ursy.com/wiki/x-robots-tag/) header), and let it be crawled |
| Stop crawlers fetching a section | [robots.txt](https://ursy.com/wiki/robots-txt/) Disallow |
| Label a paid or untrusted link | rel=”sponsored”, “ugc” or “nofollow” on that link |
| Remove a page that is gone for good | A 404 or 410 status. Read [404 and 410](https://ursy.com/wiki/404-and-410/) |
| Keep a PDF or image out of results | An X-Robots-Tag header on the file |

## What does noindex do? {#what-does-noindex-do}

[Google](https://ursy.com/wiki/google/)’s [robots meta tag](https://developers.google.com/search/docs/crawling-indexing/robots-meta-tag) page defines it: “Do not show this page, media, or resource in search results.” Google’s [noindex guide](https://developers.google.com/search/docs/crawling-indexing/block-indexing) says there are “two ways to implement noindex: as a <meta> tag and as an [HTTP](https://ursy.com/wiki/http/) response header”:

```
<meta name="robots" content="noindex">

X-Robots-Tag: noindex
```

Use `name="googlebot"` instead of `robots` to aim at Google only. The page still gets crawled; it just stays out of the [search engine index](https://ursy.com/wiki/search-engine-index/). Google warns that “some [search engines](https://ursy.com/wiki/search-engine/) might interpret the noindex rule differently”.

## What does robots.txt do? {#what-does-robots-txt-do}

Google’s [introduction to robots.txt](https://developers.google.com/search/docs/crawling-indexing/robots/intro) says it is “used mainly to avoid overloading your site with requests”. It is “not a mechanism for keeping a web page out of Google.” A blocked page’s [URL](https://ursy.com/wiki/url/) “can still appear in search results, but the search result won’t have a description.” Google adds that a disallowed page “can still be indexed if linked to from other sites.” The standard, [RFC 9309](https://www.rfc-editor.org/rfc/rfc9309.html), says the rules “are not a form of access authorization.” It is a request to polite crawlers, not a lock.

## What does nofollow do? {#what-does-nofollow-do}

It works at two levels. On one link, Google’s [outbound links guide](https://developers.google.com/search/docs/crawling-indexing/qualify-outbound-links) lists three values. Use `sponsored` for adverts and paid placements. Use `ugc` for comments and forum posts. Use `nofollow` “when other values don’t apply”. Google says links marked this way “will generally not be followed”. In a robots meta tag, `nofollow` means “Do not follow the links on this page”, every link at once. Read [nofollow](https://ursy.com/wiki/nofollow/) and [sponsored and UGC links](https://ursy.com/wiki/sponsored-and-ugc-links/).

## Why does the order matter? {#why-does-the-order-matter}

Because robots.txt is read first. Google says if robots.txt blocks a page, “the crawler will never see the noindex rule, and the page can still appear in search results.” Google’s meta tag page says the same of headers: robots meta tags and X-Robots-Tag “are discovered when a URL is crawled.” So never block a page you want to noindex. In [Google Search Console](https://ursy.com/wiki/google-search-console/) this mix-up shows as [indexed, though blocked by robots.txt](https://ursy.com/wiki/indexed-though-blocked-by-robots/).

## Why does it matter for search? {#why-does-it-matter-for-search}

Mixing them up is a common way to hide a page you wanted found, or keep showing one you wanted gone. A stray noindex can take a money page out of results overnight. A wide Disallow can stop Google reading your new pages, or the scripts and styles it needs. Google says not to block resources a crawler needs to understand the page. Wasted crawling on filter and search pages eats [crawl budget](https://ursy.com/wiki/crawl-budget/). Read [technical SEO](https://ursy.com/wiki/technical-seo/).

## Why does it matter for AI answers? {#why-does-it-matter-for-ai-answers}

[AI crawlers](https://ursy.com/wiki/ai-crawler/) read robots.txt too, each under its own name, such as [GPTBot](https://ursy.com/wiki/gptbot/) or [ClaudeBot](https://ursy.com/wiki/claudebot/). Robots.txt is how most AI opt-outs work, including [Google-Extended](https://ursy.com/wiki/google-extended/). Google’s page on [AI features and your website](https://developers.google.com/search/docs/appearance/ai-features) says that to be a supporting link in an [AI Overview](https://ursy.com/wiki/ai-overview/) or [AI Mode](https://ursy.com/wiki/google-ai-mode/), “a page must be indexed and eligible to be shown in Google Search with a snippet.” So noindex takes a page out of those answers too. To limit what Search shows without leaving it, Google points to `nosnippet`, `data-nosnippet` and `max-snippet`. Read [which AI crawlers to allow, and which to block](https://ursy.com/wiki/block-ai-crawlers/).

## What if robots.txt itself fails? {#what-if-robots-txt-itself-fails}

The file’s own status code matters. Google’s [robots.txt spec](https://developers.google.com/search/docs/crawling-indexing/robots/robots_txt) says its crawlers “treat all 4xx errors, except 429, as if a valid robots.txt file didn’t exist”. That means no rules at all. A server error is worse: Google stops crawling for the first 12 hours, then uses its last good copy for up to 30 days. Google usually caches the file for up to 24 hours, and reads only the first 500 KiB. Read [HTTP status code](https://ursy.com/wiki/http-status-code/).

## Other robots meta rules worth knowing {#other-robots-meta-rules-worth-knowing}

| Rule | What Google says it does |
| --- | --- |
| `none` | Equivalent to `noindex, nofollow` |
| `nosnippet` | No text snippet or video preview in results |
| `max-snippet:[number]` | Snippet limited to that many characters; 0 means none |
| `noimageindex` | Do not index images on this page |
| `unavailable_after:[date]` | Do not show the page after that date and time |

Google says if rules conflict, the more restrictive one applies.

## Worked example: a law firm’s search pages {#worked-example-a-law-firms-search-pages}

A law firm finds hundreds of its internal search result addresses, such as `/search?q=divorce`, listed in Google. These are [URL parameter](https://ursy.com/wiki/url-parameter/) pages. Its first idea is to add this to robots.txt:

```
User-agent: *
Disallow: /search
```

That stops crawling, but it does not remove what Google already knows. Google says a blocked page’s URL “can still appear in search results”, just without a description. The order that works:

1. Add `<meta name="robots" content="noindex">` to the search results template, and leave `/search` open in robots.txt.
2. Let Google recrawl the addresses and drop them. Google says “it may take months for [Googlebot](https://ursy.com/wiki/googlebot/) to revisit a page”. The [URL Inspection](https://ursy.com/wiki/url-inspection/) tool shows what Googlebot received, and can request a recrawl.
3. Only once they have gone, if crawling is still heavy, add the Disallow line.

## Common mistakes {#common-mistakes}

- Writing `noindex` inside robots.txt. Google [stopped honouring it](https://developers.google.com/search/blog/2019/07/a-note-on-unsupported-rules-in-robotstxt) on 1 September 2019. Its spec lists only user-agent, allow, disallow and sitemap.
- Blocking a page in robots.txt and adding noindex to it at the same time, so Google never reads the noindex.
- Using nofollow on internal links to hide a page. Google says the linked pages may still be found other ways; for your own pages it points to robots.txt or noindex. Read [internal linking](https://ursy.com/wiki/internal-linking/).
- Leaving a test site’s sitewide noindex in place when the site goes live.
- Putting a noindexed page in the [XML sitemap](https://ursy.com/wiki/xml-sitemap/), which sends Google mixed signals.
- Using noindex when the real fix is a [canonical tag](https://ursy.com/wiki/canonical-tag/) for [duplicate content](https://ursy.com/wiki/duplicate-content/).
- Treating robots.txt as security. Private pages need a login.

## How to check it {#how-to-check-it}

1. Read your robots.txt with our [robots.txt checker](https://ursy.com/robots-txt-checker/), and make sure it does not block pages that carry noindex.
2. Check a page’s robots meta tag with our [meta tag checker](https://ursy.com/meta-tag-checker/), and the X-Robots-Tag header with our [HTTP header checker](https://ursy.com/http-header-checker/). Read [meta tag](https://ursy.com/wiki/meta-tag/).
3. Check all four at once: noindex, robots, canonical and status. Our [“Can Google index this page?” checker](https://ursy.com/indexability-checker/) does this, and our [Canonical Tag Checker](https://ursy.com/canonical-checker/) checks canonicals in detail.
4. Check your sitemap lists only pages you want indexed, with our [sitemap checker](https://ursy.com/sitemap-checker/).
5. Check the rel values on a page’s links with the [link rel checker](https://ursy.com/webmaster-tools/link-rel-checker/), and find dead links with our [broken link checker](https://ursy.com/broken-link-checker/).
6. Check a removed page answers 404 or 410, not a [soft 404](https://ursy.com/wiki/soft-404/), with our [redirect checker](https://ursy.com/redirect-checker/).
7. See which AI crawlers your rules let in with our [AI bot checker](https://ursy.com/ai-bot-checker/).
8. Find filter links that make endless pages with our [Crawl Trap Checker](https://ursy.com/crawl-trap-checker/).
9. In Google Search Console, the URL Inspection tool shows whether Google could crawl the page and what it saw. Read [crawled, currently not indexed](https://ursy.com/wiki/crawled-currently-not-indexed/) for a different cause.
10. Compare your rules with a rival’s in [Compare Two Websites](https://ursy.com/compare-websites/).
11. Over time, the [index coverage monitor](https://ursy.com/pro/index-coverage-monitor/), the [crawl trap guard](https://ursy.com/pro/crawl-trap-guard/) and the [sponsored link tracker](https://ursy.com/pro/sponsored-link-tracker/) are in URSY Pro, opening in stages.

## What URSY.com counts {#what-ursy-counts}

We count every request, so a [bot](https://ursy.com/wiki/bot-web-robot/) that reads a noindexed page still shows up: noindex changes what search shows, not who visits. A bot reading the same page 10 times is 10 requests. Query strings are never stored, only the path, so `/search?q=divorce` is counted as `/search`. The full rules are on our [methodology](https://ursy.com/methodology/) page.

## Questions {#questions}

### Can I use noindex and robots.txt on the same page? {#can-i-use-noindex-and-robots-txt-on-the-same-page}

Not if you want the noindex to work. Google must crawl the page to see it.

### How long does noindex take to work? {#how-long-does-noindex-take-to-work}

Until Google recrawls the page. Google says that can take months. Request a recrawl with URL Inspection to speed it up.

### Does nofollow stop a page being indexed? {#does-nofollow-stop-a-page-being-indexed}

No. It is about links. A page linked with nofollow can still be found other ways and indexed.

### Do other search engines follow the same rules? {#do-other-search-engines-follow-the-same-rules}

Mostly, but Google warns some may read noindex differently, and robots.txt rules “may not be supported by all search engines”.

### How do I remove a page from Google fast? {#how-do-i-remove-a-page-from-google-fast}

Google’s 2019 note points to the Search Console removal tool for a temporary removal, while noindex or a 404 does the permanent job.

## Related words {#related-words}

- [Noindex](https://ursy.com/wiki/noindex/)
- [robots.txt](https://ursy.com/wiki/robots-txt/)
- [Nofollow](https://ursy.com/wiki/nofollow/)
- [X-Robots-Tag](https://ursy.com/wiki/x-robots-tag/)
- [Indexed, though blocked by robots.txt](https://ursy.com/wiki/indexed-though-blocked-by-robots/)
- [Sponsored and UGC links](https://ursy.com/wiki/sponsored-and-ugc-links/)
- [Canonical tag](https://ursy.com/wiki/canonical-tag/)
- [Crawl budget](https://ursy.com/wiki/crawl-budget/)
- [URL inspection](https://ursy.com/wiki/url-inspection/)

## Sources {#sources}

- [Google Search Central, Introduction to robots.txt](https://developers.google.com/search/docs/crawling-indexing/robots/intro), checked 24 November 2026
- [Google Search Central, Block Search indexing with noindex](https://developers.google.com/search/docs/crawling-indexing/block-indexing), checked 24 November 2026
- [Google Search Central, Qualify your outbound links to Google](https://developers.google.com/search/docs/crawling-indexing/qualify-outbound-links), checked 24 November 2026
- [Google Search Central, Robots meta tag, data-nosnippet and X-Robots-Tag specifications](https://developers.google.com/search/docs/crawling-indexing/robots-meta-tag), checked 24 November 2026
- [Google Search Central, How Google interprets the robots.txt specification](https://developers.google.com/search/docs/crawling-indexing/robots/robots_txt), checked 24 November 2026
- [Google Search Central, AI features and your website](https://developers.google.com/search/docs/appearance/ai-features), checked 24 November 2026
- [Google Search Central Blog, A note on unsupported rules in robots.txt](https://developers.google.com/search/blog/2019/07/a-note-on-unsupported-rules-in-robotstxt) (2 July 2019), checked 24 November 2026
- [IETF, RFC 9309: Robots Exclusion Protocol](https://www.rfc-editor.org/rfc/rfc9309.html), checked 24 November 2026

*Updated 24 November 2026 by URSY.com.*
