Visibility Guide
Hreflang, CDN Routing, and International Website Performance
International SEO works when the locale signal and the delivery path agree: explicit alternate URLs for crawlers, predictable routing for users, and a cache key that never mixes languages.
On this page
Hreflang and CDN routing solve different problems. Hreflang tells Google which URLs are alternate language or regional versions of substantially equivalent content. CDN routing decides where and how a request is served. Neither replaces the other. A fast French page with broken reciprocal annotations can appear in the wrong market; a perfectly annotated site can still serve the wrong language from a shared cache.
Google recommends separate locale URL configurations and explicit rel="alternate" hreflang annotations. It also warns that locale-adaptive pages can be missed because Googlebot may crawl from US-based IP addresses and does not send Accept-Language. The safe architecture is therefore explicit URLs, stable content selection, and edge delivery that does not depend on a crawler guessing its country.
Build the locale model first
Choose a URL pattern that your teams can operate consistently: language or region directories, subdomains, or separate domains. The pattern itself does not tell Google the target audience. Map each URL to a locale using hreflang and make the page content genuinely localized where the main content differs.
For every page in a cluster:
- List itself and every supported alternate.
- Use fully qualified HTTPS URLs.
- Use valid language and optional region codes, such as
en,fr, orfr-CA. - Add
x-defaultfor a language selector or fallback page when it is useful. - Make the relationship bidirectional. If the English page points to the French page, the French page must point back.
- Use a canonical URL in the same language, or the best available substitute when a same-language canonical does not exist.
Google supports three equivalent implementation methods: HTML link elements, HTTP Link headers, and XML sitemap annotations. Pick the method your publishing pipeline can validate reliably. Combining all three is not automatically better and creates more places for a stale URL to disagree with the others.
<link rel="alternate" hreflang="en" href="https://www.example.test/en/item" />
<link rel="alternate" hreflang="fr" href="https://www.example.test/fr/item" />
<link rel="alternate" hreflang="x-default" href="https://www.example.test/" />
The lang attribute and hreflang are not language-detection shortcuts. Google uses algorithms to understand language, while hreflang describes your declared alternatives. Treat the declarations as a complete URL graph, not as a translation label added to one template.
Do not let IP geolocation choose the only URL
A visitor may be routed to a nearby edge without changing the canonical locale URL. Keep locale selection explicit, provide a visible selector, and let the CDN optimize delivery of the chosen URL rather than silently rewriting every request based on IP.
Make CDN routing locale-safe
1. Route on stable URL identity
Prefer a routing model where /fr/, fr.example.test, or a country-specific hostname identifies the locale before caching. Route those hostnames or paths to the appropriate origin or edge policy. If a request has no locale, send it to a deliberate fallback or selector rather than making a hidden, permanent choice that a crawler cannot reproduce.
2. Define the cache key explicitly
The cache key must distinguish every input that changes the representation. At minimum, check hostname, path, query parameters, cookies, authorization, and any language or device headers used by the application. If the origin varies on Accept-Language, either include that variation in the cache design or avoid using the header as the primary locale selector. A cached English response served to a French URL is both a user-facing defect and a crawl signal problem.
Do not assume that adding Vary automatically fixes every CDN. Validate the actual cache behaviour of the chosen provider. Inspect cache hits and misses, response headers, and the body returned after a warm cache from multiple regions.
3. Separate performance routing from content selection
The nearest or fastest point of presence can serve a request, but it should not silently change the page's language. A multi-CDN strategy can improve resilience and regional performance while keeping locale identity stable. Multi CDN delivery is most useful when each network applies the same host, path, header, cookie, and purge rules.
4. Keep redirects narrow and intentional
If a user selects French, redirect to the French URL once and remember the choice in a transparent way. Avoid chains, automatic redirects for every crawler, or redirecting a URL to a different locale solely because the request came from a particular IP range. A stable locale URL is easier to crawl, cache, measure, and share.
A rollout sequence that protects both SEO and speed
- Create a locale inventory. Export every canonical URL, its language, region, alternate set, redirect target, and sitemap membership.
- Validate the graph. Check self-references, reciprocal links, absolute URLs, valid codes,
x-default, and same-language canonicals. Test the rendered HTML, headers, or sitemap that Google actually receives. - Test the edge. Warm each locale URL from several regions. Compare body language, canonical, hreflang,
Content-Languagewhere used, cache status, and response time. Test authenticated and personalized paths separately. - Test crawler access. Request each locale with a normal browser, a verified crawler workflow, and without
Accept-Language. Confirm that robots rules and firewall policies are consistent across locales. - Release in stages. Start with a small set of templates or a controlled region. Watch locale-level RUM, synthetic checks, cache pollution, redirect rates, Search Console indexing, and crawl logs.
- Keep a rollback. Store the prior routing and cache configuration. If a locale is mixed, disable the new geo rule or restore the previous cache key before purging the affected objects. If the issue is only one market, roll back that market rather than changing every locale.
For the infrastructure side, see the managed CDN overview. For crawl and index diagnostics, Technical SEO/GEO provides the right operational context. The RUM versus synthetic monitoring guide explains how to measure the real experience separately from controlled tests.
Common mistakes
- Using
en-UKinstead ofen-GB; region codes are ISO 3166-1 alpha-2, and the language code comes first. - Adding hreflang only to the dominant language page instead of every participating version.
- Pointing localized pages to a different-language canonical, or using an HTTP URL in the alternate set.
- Varying the body by IP while keeping one shared cache key.
- Testing only cold caches, only one continent, or only the home page.
- Assuming CDN proximity and language are the same routing decision.
- Blocking one locale's Googlebot traffic while allowing the others.
- Publishing a new locale before its reciprocal links, sitemap entries, and cache policy exist.
Google's localized versions documentation and locale-adaptive crawling guidance should be part of the release checklist. If your edge and SEO teams need one operating model, contact Optimi.
There are only two hard things in Computer Science: cache invalidation and naming things.
Make every locale fast and discoverable
Talk to our team about locale-safe CDN routing, hreflang validation, and international observability.
Contact Optimi