What hreflang does—and what it does not do
If your site offers equivalent pages for different languages or regions, hreflang helps search engines understand which version is intended for which audience. A product page in English for the United States, for example, might have a counterpart in English for the United Kingdom and another in Spanish. Hreflang connects those pages so a search engine can choose an appropriate version to show a user.
Hreflang is a signal about page alternatives, not a translation tool or a way to guarantee rankings. It does not make a page useful in a language it does not actually serve. Before adding it, make sure each version is accessible, has content suited to its intended audience, and allows visitors to switch versions if they want to.
Decide which pages belong in an alternate set
Start by mapping pages that serve substantially the same purpose. A French guide and its English equivalent can form an alternate set, as can regional versions of a service page with different prices, spelling, or availability. Do not connect unrelated pages merely because they sit at similar positions in two site menus. If a translation has no counterpart yet, it does not need a made-up alternate.
Use a language code such as en or es when a version targets a language broadly. Add a region when the distinction matters, as in en-US and en-GB. The region alone is not enough: a code such as US does not identify a language. You may also use x-default for a language selector or other default page that does not target one specific language or region. It is optional, not a substitute for labeling actual language versions.
Keep a simple page map before implementation. For each set, record every live URL, its intended language or region, and whether the page is indexable. This makes missing translations and mismatched URLs easier to spot.
Add consistent annotations
A common approach is to place alternate-link annotations in the head of each HTML page. Each annotation identifies a language or language-and-region code and the URL of that version. For a set containing English and Spanish pages, the English page should identify both the English and Spanish URLs; the Spanish page should identify those same two URLs. Include each page’s own URL in its set. The links should point to full, absolute URLs so there is no ambiguity about the destination.
You can instead provide hreflang information through an XML sitemap. HTTP headers are another option, particularly for non-HTML files. Choose an approach your team can maintain reliably; if you use more than one, keep them in agreement. On a large site, generating annotations from a maintained page map is usually less error-prone than editing them by hand.
Hreflang and canonical tags have different jobs. A canonical tag indicates a preferred URL among duplicate or very similar URLs; hreflang identifies audience-specific alternatives. In a typical set of distinct language or regional pages, each version should have a canonical URL appropriate to that version. Pointing every regional page’s canonical tag to one region can undermine the alternate set.
Check the pages, not just the tags
A useful review starts with a small sample of alternate sets. Confirm that every listed URL resolves to the intended page, that the page is available for indexing, and that its declared language or region matches its content. Check for return links: if one page names another as an alternate, the other should name it back. Also check that every page in the set lists the same alternatives, including itself.
Watch for practical conflicts. A redirect may send an annotated URL somewhere else, a copied template may label an English page as Spanish, or a translated page may still use a canonical URL from the original language. Automatic location redirects can also make it difficult for people and search engines to reach a chosen version. Offer a visible language or region switcher and let visitors change versions without losing their place when a matching page exists.
Maintain hreflang as the site changes
Hreflang is not a one-time setup. When you publish a new translation, add it to the relevant alternate set on every participating page. When you remove or move a page, update references to its old URL. Periodically review your page map against the live site, especially after changes to templates, navigation, or URL structure.
The goal is modest but valuable: make it easier for search engines to identify the version you created for each audience. Clear page relationships, accessible content, and regular checks matter more than an elaborate annotation system that no one can keep accurate.



