Skip to main content
THE SURE LAB
Engineering

Getting bilingual Thai/English SEO right on Next.js

1 min read

The hreflang, canonical and sitemap mistakes that keep recurring — and how to prove you avoided them.

Bilingual sites with broken SEO all fail the same way: Google serves the wrong language, or decides the two pages are duplicates and ranks only one of them.

It starts with URL structure. A path prefix — /th and /en — is more legible than subdomains or query strings, and it guarantees every page has exactly one address per language.

Then hreflang, which must list every language including itself, plus an x-default for visitors whose language you do not serve. The most common mistake is pointing hreflang at a URL that redirects or 404s; Google discards the whole set when that happens.

For canonical tags, each page must point at itself rather than at the primary language. Doing the latter tells Google the English page should not be indexed at all.

On sitemaps, Next.js supports alternates.languages directly in sitemap.ts and emits the xhtml:link entries for you. No external library is needed.

The check that actually works is reading the HTML the server sent, not what DevTools shows after JavaScript has run — some crawlers only ever see the first response.

Share this postFacebookLINEX