Fixing Blocked or Noindexed Hreflang Targets
A hreflang cluster is only as good as its weakest address. If one of the pages it names is blocked by robots.txt, carries a noindex instruction, sits behind a password or points at a staging server, Google cannot use that version, and it may also be unable to read the return annotations the page is supposed to provide.
Nothing looks broken to a visitor, which is why these errors survive for months. This guide shows how to find every blocked target, decide whether the page should be indexable at all, and then either open it up or take it out of the cluster cleanly.
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 target cannot be shown. A page with
noindexis dropped from the index, so there is nothing for Google to swap in for German searchers, whatever the annotations say. Google has said it ignores hreflang pointing at pages it will not index. - The target cannot vouch for the others. A page disallowed in robots.txt is never fetched, so Google never reads its head. The return tags it contains, which the rest of the cluster relies on, are invisible. The British page's link to Germany is left unconfirmed.
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.
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:
| Block | Where it lives | What Google sees | Typical origin |
|---|---|---|---|
robots.txt Disallow | /robots.txt on the target's host | Cannot fetch the page, so cannot read its tags | A rule written for one folder that matches the locale prefix too |
Meta robots noindex | The page's HTML head | Fetches the page, reads the instruction, drops it | A translation plugin or CMS setting for "draft" languages |
X-Robots-Tag: noindex | An HTTP response header | Same as meta noindex, but invisible in View Source | Server or CDN rules meant for a staging host, copied to live |
| 401 or 403 response | Web server, firewall or basic auth | Access refused; nothing to index | A locale kept private until launch, or bot protection |
| Staging or preview address | The href in the annotation itself | A host that is locked, noindexed or disallowed | Annotations generated on staging and deployed unchanged |
| Geo or login wall | Application logic | A redirect to a sign-in or country page instead of content | Country 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.
| Situation | Right outcome | What to change |
|---|---|---|
| Finished, live locale that was blocked by accident | Indexable and in the cluster | Remove the block; leave the annotations as they are |
| Translation not finished or not reviewed | Not indexed and not in the cluster | Keep the block; remove the locale from every other page's annotations |
| Machine translation you have not checked | Usually kept out until reviewed | Treat as unfinished |
| Staging, preview or test copy | Never in the live cluster | Replace the staging address with the live one, or remove it |
| Members-only or account pages | Not indexed, no hreflang | Remove annotations from these templates entirely |
| Thin regional copy you are retiring | Consolidated into the main locale | Redirect 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.
Platform notes
- WordPress. WPML and Polylang can hide languages from visitors or search engines while they are being translated, and an SEO plugin may add noindex to specific post types or archives in one language only. Check the language settings and the SEO plugin's per-language defaults together. The WordPress hreflang guide covers plugin clashes in more depth.
- Shopify. A market can be set up with a domain or subfolder before it is ready. Shopify's
own robots.txt is generated from a theme template, so an app or a customised
robots.txt.liquidmay be the source of a disallow rule. - Next.js and Nuxt. Environment variables often decide whether a noindex tag is added. A build that reads the wrong variable can ship noindex to production for one locale domain only. See hreflang in Next.js and Nuxt.
- CDNs and firewalls. Cloudflare, Sucuri and similar services can challenge crawlers by country or by rate. A 403 or a challenge page served to Googlebot on one locale host is a block, even though it never appears in your code.
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
- One list of public locales. Generate annotations, sitemaps and the language switcher from a single configuration that marks each locale as public or not. A locale that is not public is never named.
- Release checks. Add a check to your deployment that fetches one page per locale
and fails if it sees
noindexin the head or header, a 401 or 403, or a staging hostname in anyhreflanglink. - Review robots.txt changes. Treat robots.txt like code: keep it in version control and have someone read every change for prefixes that are shorter than they need to be.
- Soft launches without hreflang. If you want to share a new locale privately before launch, protect it with a password and leave it out of the annotations. Add it to the cluster on the day it becomes public, not before.
For the underlying mechanics of disallow rules and noindex outside hreflang, see fixing noindex and disallow conflicts.
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.
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 โ