hreflang tells a search engine which edition to show which reader, so an Indonesian visitor does not land on your English page and immediately bounce. Get it wrong and your translations compete with each other, which nobody wants.
The rules that matter
- Every edition points at every other edition, including itself. Four languages means four links on every page.
- Link back: <link rel=canonical> always points at that edition's own URL, never at English.
- Add x-default for people whose preferences match nothing.
- Put the same pairs in the sitemap, because crawlers trust sitemaps where <head> is long.
<link rel="alternate" hreflang="en" href="https://example.com/en/news/small-web-revival/" />
<link rel="alternate" hreflang="id" href="https://example.com/id/news/small-web-revival/" />
<link rel="alternate" hreflang="es" href="https://example.com/es/news/small-web-revival/" />
<link rel="alternate" hreflang="fr" href="https://example.com/fr/news/small-web-revival/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/en/news/small-web-revival/" />Two mistakes that are everywhere
- Pointing every canonical at the English page. Google then keeps only one edition, usually the wrong one for your visitors.
- Generating hreflang for languages you removed last week. Dead links in the pair cost you the trust of the whole cluster.
The full set of checks is boring and mechanical, and boring means it should be generated by your build, written by hand, or both. Generate it. This site does: run the build, look at the head of any article, count the links. There are exactly the same number in the sitemap, which is the gacor part.
