Three search controls are often discussed as if they were interchangeable. They are not. A robots.txt rule changes crawler access, a meta robots tag speaks to indexing on an HTML page, and an X-Robots-Tag can carry indexing instructions in the HTTP response itself. The wrong choice can create a particularly awkward failure: Google knows a URL exists, but the site has blocked the crawler from seeing the directive that was supposed to remove it.
The safest approach is to start with the outcome you need, then choose the narrowest control that achieves it. That principle also applies to broader technical SEO work: make the signal explicit, keep it testable, and avoid stacking several contradictory controls on the same URL.

Crawling and indexing are separate decisions
Crawling is the act of fetching a URL. Indexing is the decision to store and potentially show information from that URL in search. Those are related steps, but they are not the same. Google documents robots directives separately for this reason; its robots meta tag and X-Robots-Tag documentation explains which directives can be delivered in HTML and which can be sent in HTTP headers.
| Control | Best used for | What it does not guarantee |
|---|---|---|
robots.txt | Managing crawler access to URL patterns | Removal of a URL from the index |
<meta name="robots"> | Index/follow/snippet rules for HTML pages | Anything if the crawler cannot fetch the page |
X-Robots-Tag | Index rules for PDFs, files or server-controlled responses | Correct behavior if another layer sends conflicting headers |
When robots.txt is the right tool
Use robots.txt when the goal is to reduce or prevent crawling of predictable URL patterns that a crawler does not need to fetch. Examples can include internal search paths, certain faceted combinations, or technical endpoints. Before blocking a pattern, however, confirm that Google does not need to crawl those URLs to understand canonicals, redirects or a noindex directive. This matters on filter-heavy WordPress sites, where an overbroad disallow can hide the signals you intended search engines to process. Our guide to faceted navigation and crawl traps covers that interaction in more depth.
Do not use robots.txt as a dependable removal mechanism for a URL that is already known to search engines. A blocked URL may still be referenced by links or other signals. If removal from search is the goal, use an index-control method that the crawler can actually see.
When meta robots is the right tool
For normal HTML pages, a meta robots directive is usually the cleanest way to say that a page may be crawled but should not appear in search. A typical example is noindex,follow on a low-value archive or an internal utility page. Google notes in its noindex guidance that the crawler must be able to access the page to see the directive.
On WordPress, avoid blanket theme-level noindex logic that does not distinguish page types. A site can legitimately have indexable service pages, useful category hubs, non-indexable internal search pages and conditional archives. The decision should follow search intent and page value rather than post type alone.
When X-Robots-Tag is better
X-Robots-Tag is especially useful for assets such as PDFs, generated exports and other responses where inserting a meta tag is impossible or awkward. It can also be managed at the web-server or application layer, which makes it useful for repeatable rules. The trade-off is visibility: HTTP-header rules are easier to forget because they do not appear in the page source.
Whenever you use header-based directives, document them and test the final response. A CDN, security layer or reverse proxy can modify headers after WordPress generates them. The only reliable audit is the response actually delivered to a crawler.
Where conflicting signals cause trouble
- Do not block a URL in robots.txt and expect Google to read its meta noindex.
- Do not send both index and noindex directives from different layers. Resolve the source of truth.
- Do not noindex a URL that should consolidate through a canonical without understanding the trade-off. Canonicalization and index exclusion communicate different intentions.
- Do not apply global rules to parameters until you have mapped valid, invalid and potentially useful combinations.
A six-step way to choose the control
- State the desired outcome: stop crawling, prevent indexing, consolidate duplicates, or remove obsolete content.
- Identify the URL or file type and where you can reliably control the response.
- Choose one primary control.
- Check robots.txt, page source and response headers for conflicts.
- Test a representative set of URLs, including edge cases.
- Monitor Search Console and server logs after deployment rather than assuming the rule worked.
If Google is already selecting an unexpected version, review what to do when Google indexes the wrong page before adding more directives. Often the cause is inconsistent internal linking, canonicals or redirects rather than the absence of another robots rule.
Verify the response, not the WordPress setting
Do not stop after changing a WordPress checkbox or server rule. Inspect the final URL from outside the admin session. Check whether it can be fetched, inspect the HTML robots tag, review response headers, and verify canonical behavior. If the control differs by template, test several URLs from each affected group instead of one convenient example.
Keep a small change record that lists the rule, its purpose, the URL pattern and the expected crawler behavior. This becomes especially useful months later when a developer sees a noindex header and needs to know whether it is intentional or a forgotten experiment.
Pre-deployment questions worth writing down
- Should the crawler fetch this URL?
- If fetched, should the URL be eligible for indexing?
- Should signals consolidate to another URL instead?
- Does the rule apply to HTML, a file, or both?
- Could a CDN, security plugin or hosting layer override the response?
Choose the control by outcome
Start with the result you need: control crawling, control indexing, or send an indexing directive with the response. Then use the smallest number of signals necessary and test the response a crawler actually receives. A clear search-control policy is easier to audit than a stack of defensive rules that contradict one another.