Robots.txt vs Noindex vs Nofollow: Which One Do You Actually Need?
Three controls, three different jobs. Blocking a URL in robots.txt does not remove it from Google, noindex does not save crawl budget, and nofollow is not a privacy tool. Here is when to use each.
Robots.txt vs Noindex vs Nofollow: Which One Do You Actually Need?
Every week we audit a site where a page the owner "blocked" still ranks, or a page they wanted indexed silently disappeared. In nearly every case the cause is the same: using one of these three controls when the situation called for another.
They operate at different stages of how a search engine processes a URL:
| Control | Stage it affects | What it prevents | What it does not prevent |
|---|---|---|---|
robots.txt Disallow | Crawling | Googlebot fetching the URL | The URL appearing in the index |
noindex | Indexing | The page appearing in search results | Googlebot crawling it |
nofollow | Link following | Passing signals through a link | The target being crawled or indexed via other links |
robots.txt: controlling crawling
robots.txt lives at the root of your host and tells compliant crawlers which paths they may request.
User-agent: *
Disallow: /search
Disallow: /cart
Disallow: /api/
Allow: /api/public/
Sitemap: https://www.example.com/sitemap.xml
What it is for
- Keeping crawlers out of infinite spaces: internal search results, faceted filters that generate millions of combinations, calendar widgets.
- Protecting server resources from crawl load on expensive endpoints.
- Steering crawl budget on very large sites toward the URLs that matter.
What it is not for
Removing pages from Google. If a URL is disallowed but other pages link to it, Google can still index the URL itself, showing it in results with no description ("No information is available for this page"). Worse, if the page has a noindex tag, Google cannot see it, because it is not allowed to fetch the page. The noindex is never read.
Hiding private content. robots.txt is a public file and a polite request. Anyone can read it to find the paths you consider sensitive, and non-compliant bots ignore it. Use authentication.
Common mistakes we find
- Blocking
/wp-content/,/assets/or/_next/. Google needs CSS and JavaScript to render pages; blocking them degrades indexing and can make pages look empty. - A staging
Disallow: /that shipped to production. - Blocking a directory and expecting its pages to drop out of the index.
- Case sensitivity:
Disallow: /Admindoes not block/admin. - A
robots.txtthat returns500. Google treats a server error as "crawl nothing" for the whole site until it recovers.
noindex: controlling indexing
noindex is a per-page directive, delivered either as a meta tag in the HTML or as an HTTP header.
<meta name="robots" content="noindex">
X-Robots-Tag: noindex
The header form works for non-HTML files (PDFs, images) and for whole response types at the server level.
What it is for
- Pages that must exist for users but have no search value: login, cart, checkout, account pages, thank-you pages.
- Thin or duplicate pages you want to keep live: tag archives, printer-friendly views, filtered listings.
- Removing a page from search results while keeping it accessible by URL.
How it behaves
Google must crawl the page to see the directive. After it does, the page is dropped from the index on the next processing cycle, usually within days. Over time, Google also crawls noindex pages less often and eventually treats their links as nofollow, so a noindex page is not a good place to park important internal links.
Common mistakes
noindexcombined withrobots.txtDisallow on the same URL. The block wins and thenoindexis never seen.noindexleft on a page after a redesign or injected by a tag manager rule. Always check the rendered HTML, not just the template source.noindexon paginated category pages beyond page 1. Google recommends letting them index with self-referencing canonicals;noindexsevers the crawl path to deep products.noindexon a page that is also listed in the XML sitemap. Not harmful, but it sends conflicting signals and clutters the coverage report.
nofollow: controlling link signals
rel="nofollow" on a link tells search engines not to associate your site with the target and not to pass ranking signals through that link.
<a href="https://example.com" rel="nofollow">Example</a>
Since 2019, Google treats nofollow as a hint, not a directive, and introduced two more specific values:
rel="sponsored"for paid links and ads.rel="ugc"for user-generated content such as comments and forum posts.
What it is for
- Paid placements and affiliate links (use
sponsored). - Links in comments and other user-submitted content (use
ugc). - Links to pages you do not vouch for.
What it is not for
- Hiding pages. The target can still be discovered through other links, sitemaps or external sites, and can still be indexed.
- Sculpting PageRank. Internal
nofollowto "concentrate" authority has not worked for well over a decade. Signals are not redistributed to your other links; they simply evaporate. - Keeping Googlebot out of a section. Use
robots.txtfor crawling ornoindexfor indexing.
The page-level <meta name="robots" content="nofollow"> applies to every link on the page. It has very few legitimate uses on a normal site.
Decision table
| Goal | Use |
|---|---|
| Stop Google crawling an infinite or expensive URL space | robots.txt Disallow |
| Remove a page from search results but keep it live | noindex (and make sure it is crawlable) |
| Remove a page permanently | 410 Gone or 301 to a relevant page |
| Keep a page out of results and out of Google's reach | Authentication, then noindex as belt and braces |
| Mark a paid or affiliate link | rel="sponsored" |
| Mark links in user comments | rel="ugc" |
| Consolidate duplicate URLs | rel="canonical", not any of the above |
| Save crawl budget on a small site (under 10,000 URLs) | Nothing; you almost certainly do not have a crawl budget problem |
How to audit your current setup
- Fetch
/robots.txtand list everyDisallow. For each, ask: do I want these URLs out of the index (then this is the wrong tool) or just uncrawled? - Crawl the site and list every URL returning
noindex. Compare against the sitemap and against pages with organic traffic in Search Console. Anything valuable on that list is a bug. - Use the Search Console URL Inspection tool on three or four important pages. Confirm "Crawl allowed: Yes" and "Indexing allowed: Yes".
- Search for internal links carrying
nofollow. Remove it from internal links unless there is a specific reason. - Check the Pages report for "Blocked by robots.txt" and "Excluded by noindex tag" and confirm every URL there is intentional.
Summary
robots.txtcontrols crawling. It does not remove URLs from Google and it hidesnoindextags from Google.noindexcontrols indexing. It only works on pages Google is allowed to crawl.nofollow,sponsoredandugccontrol link signals. They are not privacy or crawl tools.- Most "blocked but still ranking" and "disappeared from Google" tickets are one of these three used for the wrong job.
Get Your SEO Audit
Every issue in this article, checked on your site by an auditor and delivered as a prioritized roadmap within 48-72 hours.
See pricing