SEO blog · Technical SEO

Hreflang and Multilingual SEO: How to Set Up a Multi-Language Site

Key takeaways

  • Hreflang is an annotation that tells Google which version of a page to show users based on their language and region. It does not boost rankings and it does not translate anything.
  • The core rule: every version must point to all the others and to itself, and the links must be reciprocal. Without return links, Google may ignore the annotations.
  • You can implement hreflang in HTML, in HTTP headers or in an XML sitemap. Pick one method and keep it consistent across the site.
  • A language code is required (ro, en) and the region is optional (en-US). A country code on its own, such as UK, is not valid.
  • If your site has a single language, you do not need hreflang. A correct canonical URL and clear on-page language are enough.

Hreflang is an annotation that tells Google which version of a page to show a user, based on language and region, when you publish the same content in more than one language. It does not translate your site and it does not lift rankings. It simply links the matching pages together, so a visitor in Bucharest searching in Romanian is not sent to the English version of the page.

What hreflang is and what problem it solves

The name comes from "language reference." Hreflang is a set of annotations that say: "this is the Romanian version, this is the English version, and that one is for readers in the United States." Google uses them to put the right URL in front of the right user.

The problem is simple. You have a page in Romanian and one in English with closely related content. With no hint, Google decides on its own which one to show, and sometimes it guesses wrong. With the annotations in place, it has an explicit map.

Three things hreflang does not do:

  • It does not raise rankings or pass authority between versions.
  • It does not replace good translation. Google determines a page's language from the visible text, not from attributes.
  • It does not hard-block the wrong version. It is a hint to Google, not a command.

One useful detail from Google's documentation: the language of a page is detected algorithmically from its content. The HTML lang attribute still matters for accessibility and screen readers, but it is not what tells Google the page language. Declare it correctly on every page anyway.

When you need hreflang

You need hreflang when you have the same pages in several languages or for several regions. Typical cases:

  1. A company site in Romanian and English, aimed at local clients and at foreign companies operating in Romania.
  2. A store selling in several countries with different prices and shipping, but the same language (for example en-US and en-GB, or ro-RO and ro-MD).
  3. A fully translated blog where each post has a counterpart.
  4. A site with same-language pages that differ partly by market.

If you see yourself in one of those, keep going; hreflang is one piece of the technical SEO of a multilingual site, next to indexing and URL structure. If you run one Romanian site for Romanian customers, jump to the limits section: there is nothing to configure.

Choosing a URL structure for language versions

Before writing any code, decide what the addresses look like. Google's documentation compares three main options. URL parameters such as ?lang=en are discouraged because they make segmentation difficult.

StructureExampleAdvantageDrawback
Subdirectorysite.ro/en/One domain, authority in one place, easy maintenanceGeotargeting is not obvious from the address alone
Subdomainen.site.roClear separation, can be hosted separatelyUsers recognize the country less easily; double maintenance
Country-code domain (ccTLD)site.deStrongest geotargeting signalExpensive, needs separate content and administration

For most small and midsize businesses in Romania, subdirectories are the practical choice: one domain, one certificate, one sitemap, and domain authority builds in a single place. A ccTLD makes sense when you have separate teams and budgets per country.

Two rules whatever the structure:

  • Each language gets its own URLs. Do not swap content dynamically on the same address based on a cookie or IP.
  • Avoid automatically redirecting users to another language version. Google's guidance is to avoid automatic redirects between versions, because they stop users and crawlers from reaching every variant. Offer a visible language switcher instead.

The three ways to implement it

Google supports three equivalent methods. Do not mix them without a reason. If they contradict each other, the conflicts are hard to trace.

1. Tags in the HTML head

The most common method for small and midsize sites. Every page contains the full set:

<link rel="alternate" hreflang="ro" href="https://example.ro/servicii/" />
<link rel="alternate" hreflang="en" href="https://example.ro/en/services/" />
<link rel="alternate" hreflang="x-default" href="https://example.ro/servicii/" />

The same three lines appear on both language versions. URLs are fully qualified, with the https:// protocol.

2. HTTP header

Useful for non-HTML files such as PDFs. The server sends a Link header:

Link: <https://example.ro/ghid.pdf>; rel="alternate"; hreflang="ro",
      <https://example.ro/en/guide.pdf>; rel="alternate"; hreflang="en"

3. XML sitemap

Best for large sites, because you do not load every page with dozens of tags. Each <url> entry lists all variants:

<url>
  <loc>https://example.ro/servicii/</loc>
  <xhtml:link rel="alternate" hreflang="ro" href="https://example.ro/servicii/"/>
  <xhtml:link rel="alternate" hreflang="en" href="https://example.ro/en/services/"/>
</url>

The root element must declare the namespace xmlns:xhtml="http://www.w3.org/1999/xhtml". If your sitemap is not in good shape yet, read our XML sitemap guide before adding annotations to it.

MethodBest forWatch out for
HTML headSmall and midsize sitesAdds HTML weight when you have many languages
HTTP headerPDFs and other non-HTML filesRequires server configuration
XML sitemapLarge sites, many languagesMust be regenerated whenever a URL changes

Steps for a correct setup

This is the order we follow on the technical side of a multilingual site.

  1. Inventory the pairs. List the pages that have a real equivalent in another language. A page without a counterpart stays out of the set.
  2. Freeze the final URLs. Do not start annotating while addresses are still changing, or you will have to fix every tag later.
  3. Pick one method (HTML, header or sitemap) and stay with it.
  4. Generate the full set for every page, including the page itself. For short lists you can use the hreflang generator, which produces tags ready to paste.
  5. Add x-default pointing to the page that serves people with no matching language, usually a language selector or the main version.
  6. Set lang on the html element of each page (<html lang="ro">, <html lang="en">).
  7. Check reciprocity with a crawler: if A points to B, B must point back to A.
  8. Submit the sitemap in Search Console and watch indexing for both versions.

Language and region codes: what is valid

The format follows ISO standards: a language code (ISO 639-1, two letters), optionally followed by a region code (ISO 3166-1 alpha-2). The separator is a hyphen.

CodeValid?Explanation
roYesRomanian, any country
enYesEnglish, general
en-USYesEnglish for the United States
en-GBYesEnglish for the United Kingdom
ro-ROYesRomanian for Romania (rarely needed)
x-defaultYesFallback version
GB or UK aloneNoA country code cannot stand alone; also, UK is not the ISO code for the United Kingdom (GB is)
en-EUNo"EU" is not a country code
be for BelgiumNobe is the Belarusian language

A practical rule: if you do not have different content for regions of the same language, use only the language code. Adding both ro-RO and ro-MD on identical pages just creates complexity.

What x-default means

x-default marks the page used when the user's language matches none of your versions. In practice, point it to your main page or to a language selector. It is recommended, not required, but it removes ambiguity for users in countries you do not cover.

Hreflang and canonical: how not to contradict yourself

The two mechanisms work together and are the most common source of conflicts. The rule: each language version has a canonical pointing to itself, not to the version in another language.

If the English page canonicalizes to the Romanian one, you are telling Google "the English version is just a duplicate of the Romanian one," so the hreflang annotation becomes pointless or contradictory. The URLs in a hreflang set should also be canonical, indexable and return a 200 status. The full explanation of duplicates and canonicals is in our article on canonical tags and duplicate content, and if a version is removed and redirected, see 301 vs 302 redirects.

An example: the setup on a real site

This website, succes-seo.ro, has a Romanian version at the root and an English version under /en/. Each Romanian page points to its English counterpart and vice versa, and x-default points to the English version, the fallback for visitors whose language we do not cover. It is exactly the subdirectory model from the table above: one domain, one sitemap, one authority. We do not need region codes because we do not publish different content per country.

Following the same principle, a site with three languages would carry four lines on every page: one for each language (including the current one) plus one x-default.

Common mistakes

  • Missing return links. Page A points to B, but B does not point to A. Google may ignore the pair.
  • No self-reference. Every version must appear in its own set.
  • Relative URLs. //example.ro/en/ or /en/ are not valid; write the full URL.
  • Wrong codes. en-UK and EU are the classic examples. Check the table above.
  • Cross-language canonicals. The English version canonicalized to Romanian.
  • URLs that redirect or return 404. The set should contain only indexable pages.
  • Automatic redirects based on browser language. They block crawlers from reaching the variants.
  • Machine translation published unreviewed. It is not only a quality issue: content generated at scale without added value can run into Google's spam policies. Translate carefully and review.
  • Mixing methods. HTML plus a sitemap with different sets creates confusion.

How to check that it works

Combine three checks:

  1. Crawler. Run a crawler (Screaming Frog, Sitebulb and others have hreflang reports) and look for reciprocity, code and status errors.
  2. Search Console. Inspect one URL per language and check whether it is indexed and which canonical Google picked. If a version is missing from the index, read the guide to pages not indexed. If you have not used the tool yet, start with the Google Search Console beginner's guide.
  3. Real results. Search from a browser set to the relevant language with a query that should return the right page. Treat the result as indicative, since it depends on personalization and location.

Limits: when you do not need hreflang

Not every site needs this.

  • One site, one language. There is nothing to link.
  • Partial translations, only a few pages. You can annotate only the pages that have a counterpart, but do not force the rest.
  • Same page, no regional differences. If en-US and en-GB are identical, a single en is simpler and enough.
  • Other search engines. This documentation is Google's. Other engines may rely on different signals, such as the lang attribute or the Content-Language header, so keep those correct as well.
  • Hreflang does not fix weak content. A sloppily translated page will not be served better just because you added annotations.

Conclusion: next steps

Hreflang is quiet infrastructure: when it is right, nobody notices; when it is wrong, users land on the wrong language. Apply it in this order:

  1. Decide the structure (usually subdirectories) and freeze the addresses.
  2. List the real page pairs and generate the full set, with self-reference and x-default.
  3. Verify reciprocity and codes with a crawler, then watch indexing in Search Console.

If you are launching or repairing a multilingual site and want the technical side checked end to end, our technical SEO service covers exactly these checks. For more reading, browse the blog.

Planning a site for several markets? See our international SEO services for companies entering Romania or selling abroad.

Sources and further reading

Frequently asked questions

Frequently asked questions

Is hreflang a ranking factor?

No. Hreflang does not move a page up in the results and it does not add authority. Its job is to help Google pick the right version for the user's language and region, so it swaps which page is shown rather than promoting it. It can reduce cases where a Romanian visitor lands on the English page.

Can I use hreflang across two different domains?

Yes. Annotations can connect URLs on different domains or subdomains, such as a .ro and a .de site. The condition is the same: each page must list the other versions and be listed back by them. With separate domains, also confirm that both are crawlable and indexable.

What if a page exists in only one language?

Do not invent translated versions. The existing page can carry a self-referencing annotation or simply stay out of the hreflang set. If you publish a counterpart in another language later, add reciprocal annotations to both pages at that point. A set pointing to URLs that return a 404 only damages the signal.

Should paginated or filtered pages have hreflang too?

Only pages that are indexable and have a real equivalent in another language. Filtered or parameter URLs that canonicalize to a different page do not belong in the set. Put annotations on the canonical URL, page by page, not on every possible parameter combination.

How long until hreflang takes effect?

It depends on how quickly Google recrawls the pages in the set: from a few days to a few weeks on small sites. There is no guaranteed timeline. Submit an updated sitemap, check in Search Console that both versions are indexed, and avoid changing URLs during that window.

Related service

Technical SEO & speed

See the service →

Let’s grow your site’s organic traffic

Send us your website address and we’ll reply with a free initial analysis and a concrete SEO strategy — no strings attached.