/ โ† Hreflang Fixes / Blocked Targets
In this guide
  1. Why a blocked target breaks more than one page
  2. The ways a target can be blocked
  3. Diagnosing each block precisely
  4. Should this locale be indexable at all?
  5. Common patterns and how to repair them
  6. Platform notes
  7. The fix, step by step
  8. Keeping locales open, and keeping drafts out
  9. Questions and answers

Why a blocked target breaks more than one page

Hreflang is confirmed in pairs. When the British page lists the German page, Google only trusts that link once it has crawled the German page and found a line pointing back. A blocked target interferes with that process in two separate ways, and it helps to keep them apart:

The second effect is the one that catches people out. A robots.txt block on /de/ looks like a German problem, but it quietly removes confirmation for every link that runs to or from the German pages, across every other locale.

๐Ÿ’ก robots.txt controls crawling, not indexing. A disallowed address can still turn up in results as a bare link with no description if other sites point to it. That is worse than useless for hreflang: the page is visible but Google knows nothing about its annotations.

The ways a target can be blocked

The Hreflang Checker reports a target as blocked when it cannot be used by Google. These are the causes you will meet, roughly in order of how often they turn up:

BlockWhere it livesWhat Google seesTypical origin
robots.txt Disallow/robots.txt on the target's hostCannot fetch the page, so cannot read its tagsA rule written for one folder that matches the locale prefix too
Meta robots noindexThe page's HTML headFetches the page, reads the instruction, drops itA translation plugin or CMS setting for "draft" languages
X-Robots-Tag: noindexAn HTTP response headerSame as meta noindex, but invisible in View SourceServer or CDN rules meant for a staging host, copied to live
401 or 403 responseWeb server, firewall or basic authAccess refused; nothing to indexA locale kept private until launch, or bot protection
Staging or preview addressThe href in the annotation itselfA host that is locked, noindexed or disallowedAnnotations generated on staging and deployed unchanged
Geo or login wallApplication logicA redirect to a sign-in or country page instead of contentCountry gating that also catches crawlers

Pages that return 404 or redirect elsewhere are a related but separate problem, handled in the guide to hreflang pointing at 404s or redirects. This guide is about pages that exist and work for people but are shut off to search engines.

Diagnosing each block precisely

Start from the checker's list of blocked targets, then confirm the exact mechanism for each one before you change anything. The same symptom can have three different causes, and fixing the wrong one wastes a release.

robots.txt

Open https://example.com/robots.txt and read every group that applies to Googlebot. Remember that Google follows the most specific matching group for its user agent, and within that group the longest matching rule wins. A group for Googlebot replaces the * group entirely for Google; it does not add to it. Search Console's robots.txt report shows the version Google last fetched, which may be older than the file you are looking at.

noindex in the HTML or the header

View Source misses headers, so check both at once from the command line:

curl -sI -A "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" https://example.com/de/preise/ | grep -i "^HTTP\|x-robots-tag"
curl -s https://example.com/de/preise/ | grep -io '<meta[^>]*robots[^>]*>'

Look for noindex in either place, and also for none, which means noindex and nofollow together. A robots meta tag aimed at googlebot specifically counts as well.

Authentication and firewalls

A 401 means the server wants credentials; a 403 usually means a firewall, bot-protection service or IP allow list refused the request. Run URL Inspection's live test in Search Console on the target: if Google's own fetch is refused, the problem is real, whatever your browser shows while you are logged in.

Staging addresses

Search the live HTML and sitemaps for hosts that should never appear in production, such as staging., dev., preview. or a hosting provider's temporary domain. One stray host in a template is enough to put a locked address into every cluster on the site.

Should this locale be indexable at all?

Every blocked target falls into one of two groups, and the fix is opposite for each. Decide deliberately rather than removing blocks by reflex.

SituationRight outcomeWhat to change
Finished, live locale that was blocked by accidentIndexable and in the clusterRemove the block; leave the annotations as they are
Translation not finished or not reviewedNot indexed and not in the clusterKeep the block; remove the locale from every other page's annotations
Machine translation you have not checkedUsually kept out until reviewedTreat as unfinished
Staging, preview or test copyNever in the live clusterReplace the staging address with the live one, or remove it
Members-only or account pagesNot indexed, no hreflangRemove annotations from these templates entirely
Thin regional copy you are retiringConsolidated into the main localeRedirect it and drop it from the cluster

The rule behind the table is simple: a page should be in a hreflang cluster only if you want it to be found in search. If you want it hidden, it should not be named by any other page.

Common patterns and how to repair them

A robots.txt rule that catches a locale by accident

Robots rules match from the start of the path, so a short prefix matches more than you expect. A rule written to hide an internal search page can also hide a whole language:

# Meant to block /search, but it matches every path
# starting with /s, including /sv-se/ and /shop/
User-agent: *
Disallow: /s

# Specific and safe
User-agent: *
Disallow: /search
Disallow: /*?q=

The same happens with wildcards. Disallow: /*? blocks every address with a query string, which is harmless until a site uses ?lang=fr for its locales. If your locales are parameter-based, either move them to paths or allow the parameter explicitly with a longer, more specific Allow rule.

A blanket noindex on a new language

Translation plugins and headless CMS setups often let editors mark a whole language as hidden while it is being prepared, and that setting adds noindex to every page in it. The annotations, meanwhile, are generated from the list of configured languages, so the hidden language is advertised everywhere. Either publish the language properly or change the generator so that it only lists languages marked as public.

A header left over from staging

An X-Robots-Tag: noindex header is a sensible way to keep a staging site out of search, but server configuration is often copied between environments. If the header rule is tied to a directory or a location block rather than to the staging hostname, it can travel to production. Tie it to the host:

# nginx: noindex only on the staging host
server {
    server_name staging.example.com;
    add_header X-Robots-Tag "noindex, nofollow" always;
}

A country gate that stops crawlers

Some shops show visitors from outside a country a "not available in your region" page, or send them to a sign-in page. Googlebot mostly crawls from United States addresses, so a gated Irish or Australian locale may be refused to Google every time. Let crawlers and visitors read the content, and use a banner rather than a hard block to explain delivery limits.

โš ๏ธ Do not use robots.txt to keep an unfinished locale out of the index while leaving it in hreflang. Google cannot see a noindex on a page it is not allowed to fetch, and the cluster still points at a page it cannot read. Remove it from the annotations instead.

Platform notes

The fix, step by step

Step 1

List every blocked target and the reason

Run the Hreflang Checker on the main page of each locale and export the targets it reports as blocked. For each address, record which mechanism is responsible: a robots.txt rule, a meta robots tag, an X-Robots-Tag header, a 401 or 403 response, or a staging host in the href. Confirm each one with curl or URL Inspection, because a header and a meta tag look identical in the results but are fixed in completely different places.

Step 2

Decide whether each locale should be indexed

Sort the blocked targets into two groups with whoever owns the content. Finished, reviewed pages that should appear in search belong in the first group and need the block removed. Drafts, unchecked machine translations, staging copies, account pages and regional copies you plan to retire belong in the second group, where the block stays and the annotations go. Write the decision down per locale, so a later release does not undo it.

Step 3

Remove the robots.txt rule catching the locale

For pages in the first group that robots.txt blocks, find the exact rule responsible, remembering that rules match from the start of the path and that a Googlebot group overrides the general one. Replace short or wildcard prefixes with specific paths, or add a longer Allow rule for the locale. Publish the file, then check the updated version in Search Console's robots.txt report so you know Google has fetched it.

Step 4

Clear noindex from pages that should rank

Remove noindex from the meta robots tag and from any X-Robots-Tag header on first-group pages, checking the translation plugin, the SEO plugin, server configuration and CDN rules, since any of them can add it. Where staging protection is the source, tie the header to the staging hostname rather than a folder. Remove login or country gates for crawlers too, so Googlebot receives the real page with a 200 status.

Step 5

Take unready locales out of the cluster

For second-group pages, keep the block and remove the locale from the annotations on every other page in the cluster, and from any hreflang sitemap. Change the generator so it lists only languages marked as public, instead of deleting lines by hand. Replace any staging host in an href with the live address, or remove the entry. Once the locale is ready, lift the block and add it back in the same release.

Step 6

Confirm Google can fetch and index each target

Run URL Inspection's live test on a sample of the reopened pages and check that crawling is allowed, indexing is allowed and the page returns 200. Request indexing for the most important ones. Then run the Hreflang Checker again across each locale: blocked targets should be gone, and any remaining errors will be return tags or codes that the block was hiding. Recheck after the next deployment as well.

Keeping locales open, and keeping drafts out

For the underlying mechanics of disallow rules and noindex outside hreflang, see fixing noindex and disallow conflicts.

Questions and answers

1. Can I block a language in robots.txt and still keep it in hreflang?

You can, but it achieves nothing and weakens the rest of the cluster. Google cannot fetch a disallowed page, so it never reads that page's return annotations, which means the links from every other locale to it cannot be confirmed. The page also cannot be shown properly in results. If a locale should stay out of search, remove it from the annotations on every other page. If it should be in search, remove the robots.txt rule so Google can crawl it.

2. Does Google use hreflang that points to a noindex page?

No. Google has said it ignores hreflang annotations that point to pages it will not index, which is what noindex asks for. The annotation is not harmful in itself, but that locale is effectively missing from the cluster, and searchers in that market may be shown another version instead. Decide whether the page should rank. If it should, remove noindex. If it should not, remove its entry from the hreflang on the other pages and from any hreflang sitemap.

3. How do I find an X-Robots-Tag noindex that is not in the HTML?

Request the page headers with a command-line tool such as curl using the -I option, or open the Network panel in your browser's developer tools, select the page request and read the response headers. Look for X-Robots-Tag with noindex or none. Search Console's URL Inspection also reports when indexing is blocked by a header. The source is usually a web server rule, a CDN transform rule or a plugin, so check all three after you find it.

4. Our translated section is password-protected until launch. Is that a problem?

Only if the rest of the site already names it in hreflang. A password-protected page returns 401 or a login page to Google, so it cannot be indexed or confirm return links. Keeping a locale private before launch is sensible; the mistake is advertising it early. Leave it out of the annotations and sitemaps until launch day, then remove the password, add the locale to the cluster in the same release, and run the checker to confirm everything connects.

5. Why does the checker say a page is blocked when it opens fine in my browser?

Your browser is not Googlebot. You may be logged in, you may be in a country the site allows, or your IP address may be on an allow list, while Google's crawler receives a login page, a country block, a firewall challenge or a 403. A noindex header is also invisible when you simply view the page. Use Search Console's URL Inspection live test, which fetches the page as Google does, to see exactly what the crawler receives.

6. Should a staging site have hreflang at all?

It can carry annotations for testing, but they must never reach production pointing at staging addresses, and the staging site itself should be kept out of search with a password or an X-Robots-Tag noindex header tied to the staging hostname. The safest approach is to build every hreflang address from a base URL setting that differs per environment, so the same template produces staging addresses on staging and live addresses on the live site.

7. How long after unblocking a locale will Google pick up the hreflang?

There is no fixed time. Google needs to fetch the updated robots.txt, then recrawl the reopened pages, and then recrawl the other pages in the cluster to confirm the return links. Important pages are often recrawled within days, while deeper pages can take weeks. You can speed up the most important ones by requesting indexing in URL Inspection and by making sure the reopened pages are listed in your sitemap with an accurate lastmod date.

Find every blocked target in your clusters

The Hreflang Checker follows each cluster of locale pages and validates return tags, language codes, x-default, sitemap consistency, target reachability and canonical alignment, so blocked and unreachable targets show up alongside the errors they hide.

Open Hreflang Fixes โ†’
๐Ÿ’ฌ Got a problem?
Related Guides: All Hreflang Fixes  ·  Hreflang Pointing at 404s or Redirects  ·  Noindex and Disallow Conflicts  ·  Hreflang Guide  ·  Learning Hub

About aiwebpageseo

aiwebpageseo.com is a data-driven SEO and AEO (Answer Engine Optimisation) platform providing a free suite of technical SEO tools. Rather than relying on AI-theorised assumptions, the platform analyses live URL performance, delivering objective diagnostics, page speed metrics, CLS debugging, and site crawl data alongside actionable technical tutorials.