When a site goes international, two decisions get tangled together. The first is structural: where do the language versions live? On separate domains, one per country, or under one domain as folders or subdomains? The second is declarative: how do you tell search engines which version belongs to which audience? That second job is hreflang, and it is the same job whatever structure you picked.

This guide separates the two layers, explains what each one actually decides, and shows how Ovatly's free Hreflang Tag Generator builds the declaration for versions hosted any way you like, because it works from full URLs rather than from assumptions about your structure.

Contents

  • Quick answer
  • Two different layers: hosting and declaration
  • What separate domains decide, and what they do not
  • What hreflang decides, and what it does not
  • How to generate the set, step by step
  • Worked example: English and French versions of one page
  • Limitations
  • Common mistakes
  • FAQs
  • Conclusion
  • References

Quick answer

Separate domains and hreflang are not alternatives; they operate at different layers. Domains (or folders, or subdomains) are where your language and region versions are hosted. Hreflang is the tag set that tells search engines which version of a page to show each user, and it works the same whether the versions sit on different domains or side by side on one. In the Hreflang Tag Generator you enter each version's language code and full URL, add an optional x-default fallback, and get the HTML tags plus the equivalent sitemap version. Choose your structure for operational reasons; you need the declaration either way.

Two different layers: hosting and declaration

The confusion starts because both decisions mention countries. A separate domain per country looks like a complete international strategy on its own: the French site lives at its own address, the English site at another. But an address is just an address. Nothing about owning two domains tells a search engine that the two homepages are versions of the same page, or which audience each one serves. That information has to be declared, and the declaration mechanism is hreflang.

Seen the other way, hreflang cannot host anything. A tag set pointing at URLs that do not exist declares nothing useful.

So the practical question is never "hreflang or domains?" It is "where will the versions live, and have I declared the set correctly for those addresses?" The generator is built for exactly that framing: its rows are a code plus a full URL, so the same workflow covers a French folder, a French subdomain and a French domain without distinction.

What separate domains decide, and what they do not

Choosing separate domains decides where each version is published and how the addresses read to visitors. It is a real structural choice with real upkeep: every domain is another property to maintain, and every version's templates have to carry the shared tag set.

What it does not decide is the mapping between versions. Two domains can hold two versions of a page for years without any search engine being told they are counterparts. The mapping exists only when something declares it, page set by page set. That is why a multi-domain site needs hreflang just as much as a single-domain one, and why the reciprocity rule has teeth across domains: every version must list every other version, including itself, or search engines may ignore the set.

The same logic applies in reverse to folders and subdomains. Putting versions under one domain does not declare anything either. Only the URLs matter to the declaration layer.

What hreflang decides, and what it does not

Hreflang declares, for one page that exists in several language or region versions, which version fits which audience. That is also what resolves most regional duplication concerns: near-identical pages in different regions stop looking like unexplained duplicates once each one is labelled with its audience.

Its targeting is language and region, expressed in codes. Use a plain language code such as en when the page targets all speakers of that language, and add a region such as en-GB or en-US only when the content genuinely differs by country. Region codes can also be three digits, such as 419 for Latin America. What hreflang does not target is currency or content differences within the same language and region: two pages that share a code cannot be separated by it, on any domain structure.

It also does not replace the pages' own hygiene. Each version needs a canonical tag pointing at itself, so the declaration and the canonical agree that every version is a real page in its own right, not a copy to be folded into another.

How to generate the set, step by step

  1. Open the Hreflang Tag Generator and add a row for every language or region version of the page, including the original, wherever each version is hosted.
  2. Use codes like en, en-GB or es-419, and the full URL of each version. Language codes are validated against the ISO 639-1 list; region codes are format-checked (two letters, or three digits such as 419 for Latin America).
  3. Optionally set an x-default URL for visitors whose language matches nothing: often a language selector page or your main English page.
  4. Copy the link tags into every version's <head>, on every domain involved, or use the sitemap version in your sitemap file. In the sitemap version, each <url> lists all versions as xhtml:link alternates.

Worked example: English and French versions of one page

The generator's own example uses one domain: rows en = "https://example.com/page", fr = "https://example.com/fr/page", x-default = "https://example.com/page". The output includes <link rel="alternate" hreflang="en" href="https://example.com/page">, the matching fr tag, and an x-default tag, plus a sitemap block where each <url> lists all versions as xhtml:link alternates.

Now move the French version to its own domain. The rows change only in the URL: fr becomes the full address of the French page on its own domain. The codes, the x-default row and the output shape stay the same, and so does the obligation: the tag set is copied into every version's <head>, which now means working on both domains. The move changed the addresses; hreflang simply recorded them.

Limitations

Hreflang is a declaration, not a structure and not a ranking lever. It tells engines which version fits which audience; it cannot make a version exist, make it reachable, or make it worth showing. Versions that are thin, unreachable or canonicalised away to another URL undermine the set no matter how clean the tags are.

Its targeting stops at language and region. It does not target currency, and it cannot distinguish two audiences who share the same language and region code, whether they are separated by domain or not. And because the set is reciprocal, it is only as strong as its weakest copy: one version missing the tags can lead search engines to ignore the set as a whole.

Common mistakes

  • Assuming separate domains make hreflang unnecessary. Domains host versions; they do not declare the mapping between them. The tag set is still required.
  • Assuming one domain makes hreflang automatic. Folders and subdomains declare nothing either. The set has to be built and placed.
  • Breaking reciprocity across domains. Every version must list every other version, including itself. A set updated on one domain but not the other is a broken set.
  • Adding region codes that the content does not justify. Add a region such as en-GB only when the content genuinely differs by country; otherwise use the plain language code.
  • Pointing versions at pages that canonicalise elsewhere. Each version should be a real, reachable page with a canonical tag pointing at itself.
  • Forgetting the fallback decision. An x-default row, often a language selector or the main English page, covers visitors whose language matches none of the versions, on any structure.

FAQs

Does hreflang fix duplicate content between regions? It tells engines which version fits which audience, which resolves most regional duplication concerns. The versions still need to be real, reachable pages with canonical tags pointing at themselves.

Should I use en or en-GB style codes? Use a plain language code (en) when the page targets all speakers of that language. Add a region (en-GB, en-US) only when the content genuinely differs by country.

Tags or sitemap: which implementation is better? Both are equivalent to search engines. Tags are easier for a few pages; the sitemap version scales better and avoids editing every template, which is why this tool generates both.

Can hreflang separate pages that differ only in currency? No. Hreflang targets language and region, not currency or content differences within the same language and region.

What happens if one version does not list the others? Hreflang is reciprocal: every version must list every other version, including itself, or search engines may ignore the set.

Conclusion

Decide where your versions live on operational grounds, then declare them properly wherever they ended up. The declaration is one reciprocal set of codes and full URLs, with an optional x-default fallback, and it is identical for folders, subdomains and separate domains. Build it with the Hreflang Tag Generator, and for the fallback row in depth, see the sibling guide What Is the x-default Hreflang. More topics like this live in the SEO Tools guides.

References