Multiple robots meta tags: when two tags disagree, the stricter one wins

When a page carries several robots meta tags, Google combines them, and where they conflict the more restrictive directive applies. So index, follow in one tag and noindex in another means noindex. List every robots directive on the page, then remove the component printing the one you did not intend.

This matters most when the stricter tag is the accidental one. The page looks correctly configured in your SEO plugin, and it stays out of Google regardless.

What it looks like

Before

html
<meta name="robots" content="index, follow, max-image-preview:large">
<meta name="robots" content="noindex, nofollow">

After

html
<meta name="robots" content="index, follow, max-image-preview:large">

List every directive that applies

There are three places to look, and all of them are combined.

code
curl -s https://example.com/page/ | grep -ioE '<meta[^>]*name=.(robots|googlebot|googlebot-news|bingbot).[^>]*>'
curl -sI https://example.com/page/ | grep -i x-robots-tag
  1. <meta name="robots"> tags. Each occurrence counts.
  2. Crawler-specific tags such as <meta name="googlebot">. For Google, these are merged with the general robots tag, again taking the stricter value.
  3. The X-Robots-Tag header, covered under X-Robots-Tag noindex header.

Then check the rendered page, because scripts can add tags. In Search Console, inspect the URL, open View crawled page and search the HTML for robots. Google's guidance is to avoid changing robots directives with JavaScript: if the original HTML says noindex, Google may skip rendering and never see a script that tries to remove it.

How the combination works

Think of each directive as a restriction and the result as the union of all restrictions:

Tag ATag BEffective
index, follownoindexnoindex, follow
noindexnofollownoindex, nofollow
max-snippet:50max-snippet:20max-snippet:20
indexnosnippetindexed, no snippet
allnonenoindex, nofollow

index and follow are defaults, not instructions; writing them does not cancel a noindex elsewhere. There is no way to "re-allow" indexing with a second tag.

Where the second tag comes from

WordPress core plus a plugin or theme. Core prints its own robots tag through the wp_robots filter, normally max-image-preview:large, and adds noindex on search results, on sites with Discourage search engines ticked and in a few other cases. Well-behaved SEO plugins feed their directives into that tag or replace it. Hydrogen SEO replaces it: it removes core's robots output and prints one tag of its own, so with it active there should be a single <meta name="robots">. A theme or snippet that echoes a hard-coded tag on wp_head adds a second.

Two SEO plugins. Each prints a tag from its own settings. One may hold a noindex set years ago that nobody can see in the plugin they use today. Run one plugin; the migration order is in fixing duplicate meta output.

Maintenance, coming-soon and privacy plugins that add noindex while active, and sometimes after they are "disabled" but not deactivated.

Page builders and landing-page tools with a per-page "hide from search engines" toggle that prints its own tag.

Hard-coded tags in header.php, often <meta name="robots" content="index, follow">. Harmless by itself and pointless, since those are the defaults, but it shows up as a duplicate.

Tag managers injecting a robots tag by script.

Trace and remove

  1. Decide the intended directive for the page. For most content it is the default, which needs no index, follow tag at all.
  2. Find the source of each tag. Search theme and plugin files for name="robots" and name='robots'. Deactivate suspects one at a time and re-run the curl check.
  3. Remove the extra:
    • Hard-coded theme tag: delete the line, in a child theme.
    • Second SEO plugin or builder toggle: turn the setting off, then deactivate the plugin if it is redundant.
    • Custom code: instead of echoing a tag, change the existing one. With Hydrogen SEO, the hydrogen_seo_robots_directives filter adjusts the directives it prints; see the filters reference.
  4. Set the directive you want in one place. In Hydrogen SEO that is Hydrogen SEO → Robots for post types and taxonomies and the Robots Meta section of the SEO Settings sheet for a single page, as described in robots meta settings.
  5. Purge caches.

A legitimate use of two tags

Different instructions for different crawlers are a valid reason for more than one tag, for example a general tag plus a stricter one for a specific bot:

html
<meta name="robots" content="index, follow">
<meta name="googlebot-news" content="noindex">

This keeps the page in web search and out of Google News. Hydrogen SEO prints a Googlebot-News tag of this kind when its news sitemap is on and a post has been opted out of it. The rule to remember is that for any single crawler, all tags addressed to it and all general tags are merged.

Confirm one consistent result

Run the two curl commands again. You should see one general robots tag, or none, plus any crawler-specific tags you intend, and no unexpected header. In URL Inspection, run a live test and read Indexing allowed?; it reflects the combined result. Our free SEO audit reads the robots meta tag and warns when a page is set to noindex. It evaluates the first robots tag it finds, so use the curl count to detect a second one.

Common questions

If one tag says index and another says noindex, which wins?

Noindex. Google applies the most restrictive directive among all the tags and headers that apply to it.

Does the order of the tags matter?

No. They are combined, so position in the head makes no difference.

Is it wrong to have both a robots tag and a googlebot tag?

No, if you mean to give Google different instructions. Just remember Google merges them and uses the stricter value for each directive.

Do I need an index, follow tag at all?

No. Those are the defaults when no robots directive is present.