Hreflang tags: a practical guide for bilingual EN/TH sites

Hreflang tags: a practical guide for bilingual EN/TH sites

SEOOctober 6, 2026
By Antonio Fernandez

TL;DR

  • Google accepts hreflang in three forms: HTML link elements in the head, HTTP Link headers for files like PDFs, or XML sitemap entries.
  • Values are an ISO 639-1 language code with an optional ISO 3166-1 Alpha 2 region, so en-GB is valid but en-UK and jp are not.
  • Every page must list itself and all alternates, and each pair needs a return link or Google may ignore it.
  • Search Console's International Targeting report is retired; check with URL Inspection, the Performance report and a site crawler.

Hreflang tags tell Google which language or regional version of a page to show a searcher, so a Thai speaker sees your Thai page and an English speaker sees the English one. They are annotations that connect equivalent pages across languages; they do not move rankings on their own, but they stop the wrong version from appearing in the wrong market.

For any business running a bilingual English and Thai site, hreflang is one of the few technical settings that directly affects which audience lands on which page. It is also easy to get subtly wrong. This guide explains what hreflang does, the three ways to implement it, how x-default and return links work, the errors that make Google ignore the annotations, how to set it up for an EN/TH site and how to check it afterwards.

What do hreflang tags do?

When you publish the same content in more than one language, Google sees several URLs that are about the same thing. Hreflang tags group those URLs into a set and label each one with its language, and optionally its region. Google can then swap in the version that matches the searcher's language or location in the search results.

A few points about what hreflang does not do are just as important:

  • It is a signal, not a directive. Google may still show a different version if it judges that version more useful.
  • Google does not use hreflang, or the HTML lang attribute, to work out what language a page is written in. Google uses its own algorithms to determine the language. Hreflang only links the versions together.
  • It does not consolidate ranking signals the way a canonical tag does. Each language version still has to be indexable and able to rank on its own merits.
  • It does not fix thin or machine-translated pages. If the Thai version is a weak copy of the English one, hreflang only makes the weak page easier to find.

Hreflang syntax: the three implementation methods

Google supports three equivalent ways to declare hreflang. You need only one per set of pages. Using more than one is allowed but doubles the maintenance and the chance that they disagree.

Hreflang syntax: the three implementation methods
MethodWhere the annotation livesBest suited to
HTML link elementIn the head of every page in the setMost sites, especially when the CMS or framework renders the head
HTTP response headerIn the server response for each URLNon-HTML files such as PDFs, which have no head
XML sitemapIn the sitemap, inside each URL entryLarge sites, or sites where editing page templates is difficult

Each page carries one link element per version in the set, placed in the head. The element has three attributes: rel set to "alternate", hreflang set to the language code (for example "th" or "en"), and the URL of that version, written as a full absolute address including https and the domain. A Thai page and its English equivalent would each list both URLs: the Thai URL labelled "th" and the English URL labelled "en". The page lists itself as well as its alternates.

The tags must sit in the head. If a script or a plugin injects an element that is not allowed in the head, such as an image or a div, the browser and Google may treat the head as closed at that point, and any hreflang tags below it can be ignored. This is one possible cause of "the tags are in the source but nothing happens".

HTTP headers

For files without HTML, the server sends a Link header. The format puts each URL in angle brackets followed by the relationship and the language, for example Link: <https://www.example.com/th/guide.pdf>; rel="alternate"; hreflang="th", with further versions separated by commas in the same header.

XML sitemaps

In a sitemap, each URL entry lists every version of the page, including itself, as an alternate link element in the xhtml namespace, which must be declared at the top of the sitemap file. The Thai URL entry and the English URL entry each carry the full set. This keeps hreflang out of the page templates, which helps when the site has thousands of pages, but it also means the sitemap must be regenerated whenever pages are added or removed.

Language and region codes

The hreflang value is a language code in ISO 639-1 format, optionally followed by a hyphen and a region code in ISO 3166-1 Alpha 2 format.

  • Language only: "th" for Thai, "en" for English. This is usually all a Thai and English site needs.
  • Language plus region: "en-GB" for English for users in the United Kingdom, "th-TH" for Thai for users in Thailand. Use a region only when you genuinely have different versions for different countries, such as different prices or delivery terms.
  • Region alone is not valid. "TH" without a language, or a country code used as a language, will not work. Japanese is "ja", not "jp"; the United Kingdom is "GB", not "UK".

x-default: the fallback version

The x-default value marks the page Google should show when none of the listed languages matches the searcher. Typical choices are a language selector page or the version most international visitors should see, which for many Thai businesses with international customers is the English page. You add it as one more entry in the set, with "x-default" in place of a language code, and every page in the set should list the same x-default URL.

x-default is optional, but on a two-language site it removes the guesswork for a searcher using, say, German or Korean. Without it, Google picks whichever version it thinks fits best.

Hreflang works in pairs. If the English page says the Thai page is its "th" alternate, the Thai page must say the English page is its "en" alternate. This is called a return link, and without it Google may ignore the annotation between those two pages. The reason is simple: return links stop a third-party site from claiming to be an alternate version of your page.

Each page should also list itself. In practice that means every page in a set carries an identical block of hreflang entries, which is why generating the block from one shared list is far safer than hand-writing it on each page.

Common hreflang errors

  1. Missing return links. One side of the pair points to the other but the other does not point back, often because only one language template was updated.
  2. Pointing to URLs that are not canonical. Hreflang should reference the canonical URL of each version. Pointing to a URL that redirects, returns 404 or is marked noindex can cause Google to ignore those annotations.
  3. Canonical tags across languages. If the Thai page declares the English page as its canonical, you are telling Google the Thai page is a duplicate to be dropped. Each language version should be canonical to itself.
  4. Wrong codes. "jp" is not a language code, and a region with no language is not valid. In "en-UK", Google ignores the reserved region code UK, so the tag does not target the United Kingdom; use "en-GB".
  5. Relative URLs. Hreflang URLs need to be absolute, with the protocol and domain.
  6. Mismatched URL forms. A trailing slash in the canonical but not in the hreflang, http in one and https in the other, or a Thai slug percent-encoded in one place and written differently in another. Use exactly the same URL form as the canonical tag.
  7. Tags outside the head. Injected elements that close the head early, or tags placed in the body, are not read.
  8. Conflicting methods. Sitemap annotations that say one thing and page tags that say another. Pick one method.

Setting up hreflang on an EN/TH bilingual site

A common structure for Thai businesses is English at the root and Thai under a /th/ folder, or the reverse. The steps are the same either way.

  1. Map every page to its equivalent. Build a list of English URLs and their Thai counterparts. Pages that exist in only one language get no hreflang entry for the missing language; do not point them at the home page of the other language.
  2. Decide the codes. For one Thai version and one English version, "th" and "en" are enough. Add regions only if you have country-specific versions.
  3. Choose x-default. Usually the English page for businesses with international demand, or the Thai page if almost all traffic is domestic.
  4. Generate the block from one source. Have the CMS, framework or multilingual plugin output the full set, including the self-reference and x-default, on both versions.
  5. Align canonicals. Each page canonical to itself, and hreflang URLs identical to those canonicals.
  6. Handle Thai slugs consistently. If your Thai URLs use Thai characters, make sure the canonical, hreflang and sitemap all use the same form of the URL.
  7. Link the versions visibly. A language switcher in the header gives users and crawlers a normal link between versions. Hreflang complements that link; it does not replace it.

How to check hreflang in Search Console and crawlers

Search Console's old International Targeting report, which listed hreflang errors, has been retired, so checking now relies on other tools.

  • URL Inspection in Search Console. Inspect a Thai URL and an English URL. Confirm both are indexed and that the Google-selected canonical is the page itself, not the other language. If Google has chosen the English page as canonical for a Thai URL, hreflang alone will not fix it; the content or canonical tags need work.
  • Performance report filtered by country and page. Check that searchers in Thailand mostly land on the Thai URLs for Thai queries. English pages getting Thai-query impressions in Thailand can point to a broken set.
  • Site crawlers. Desktop SEO crawlers can extract hreflang from pages and sitemaps and flag missing return links, non-200 targets, missing self-references and invalid codes across the whole site. This is the fastest way to find template-level mistakes.
  • View the rendered source. For a JavaScript-rendered site, check the rendered HTML (for example in URL Inspection's tested page) rather than only the raw source, to confirm the tags are present and inside the head after rendering.

After fixing errors, allow time for Google to recrawl both versions before judging the result; pages that are crawled rarely will update slowly.

What this means for the Thai market

Thai searchers often type English brand or product terms mixed with Thai words, and many Thai business sites serve both locals and foreign visitors. That combination makes it easy for Google to show the English page to someone searching in Thai, or the Thai page to an expatriate searching in English. A clean hreflang set, combined with properly translated pages, reduces that mismatch. For sites expanding beyond Thailand, plan region codes before launch; retrofitting "en-SG" or "en-GB" versions later means updating the hreflang block on every page in the set. A focused Thailand SEO strategy should cover both languages, and a technical SEO audit is the right time to crawl every hreflang set. Online stores with large catalogues have many templates to get right, so ecommerce SEO work should include hreflang checks, and sites being rebuilt should include hreflang in the web design specification from day one.

FAQ about hreflang tags

Do hreflang tags improve rankings?

No, hreflang tags do not raise rankings directly; they help Google show the right language version to each searcher. The indirect benefit is that users land on a page in a language they can read.

Do I need hreflang if my site has only English and Thai?

Yes, Google recommends telling it about localized versions, and a two-language site still benefits from hreflang because it tells Google the pages are equivalents rather than separate content. Simple "en" and "th" codes plus an x-default are usually enough.

Should I use the HTML tag, HTTP header or sitemap method?

Use the HTML link element for most sites, the HTTP header for PDFs and other non-HTML files, and the sitemap when editing templates is impractical. Pick one method per page set so the annotations cannot contradict each other.

Google may ignore the hreflang annotation between the two pages that do not confirm each other. Every page in the set should list every other page and itself.

Can a Thai page use the English page as its canonical?

No, because that tells Google the Thai page is a duplicate and can drop it from the index. Each language version should be canonical to itself and connected to the others through hreflang.

Hreflang problems rarely show up as an error message; they show up as the wrong page in the wrong market. If your English and Thai pages seem to compete with each other, Relevant Audience can review the setup as part of its SEO audit service.

Antonio Fernandez

Antonio Fernandez

Founder and CEO of Relevant Audience. With over 15 years of experience in digital marketing strategy, he leads teams across southeast Asia in delivering exceptional results for clients through performance-focused digital solutions.

Share to:
Copy link:

Read us often? Add Relevant Audience as a preferred source so our articles surface more in your Google results.