../courses.php
HEAD
HEAD105
90
Hreflang Basics
Tell search engines about alternate language versions of the same page.
How does the head connect pages in different languages?
The head uses
<link rel="alternate" hreflang="...">
to tell search engines that equivalent pages exist in other languages or regions.
After indexing comes language. A multilingual website needs more than translated text. Search engines need to understand which pages are alternate versions of each other.
A visitor searching in French should not always be sent to the English page if a French version exists.
The
hreflang
attribute helps search engines choose the right language or regional page.
This is especially important for a site that serves many languages from related URLs.
Alternate language links
<head>
<title>Jit HEAD - Learn The HTML Head</title>
<link
rel="alternate"
hreflang="x-default"
href="https://en.jit4all.com/learn/HEAD/">
<link
rel="alternate"
hreflang="en"
href="https://en.jit4all.com/learn/HEAD/">
<link
rel="alternate"
hreflang="fr"
href="https://fr.jit4all.com/learn/HEAD/">
<link
rel="alternate"
hreflang="uk"
href="https://uk.jit4all.com/learn/HEAD/">
</head>
rel="alternate"
says the linked page is an alternate version.
hreflang="fr"
says the alternate page is French.
href
points to the matching page in that language.
x-default
is a fallback version for users when no better language match is chosen.
Each language page should list the full alternate set, including itself.
Language matching
Search engines can send users to the page in the right language.
Duplicate clarity
Translated pages are related, not random duplicates.
Multilingual trust
Visitors are more likely to stay when they land in a language they understand.
Global structure
The head connects a family of language pages together.
Weak language setup
<link rel="alternate" href="/fr/">
Clear language alternate
<link rel="alternate" hreflang="fr" href="https://fr.jit4all.com/learn/HEAD/">
Ask ChatGPT: "Do these hreflang links point to equivalent pages in the right languages?" Then manually open the links.
Choose one English page and one translated equivalent.
Add an
hreflang="en"
alternate.
Add an alternate for one other language.
Add
x-default
if a default version exists.
Confirm that each URL opens the matching page.
Pointing hreflang to non-equivalent pages.
Forgetting the current page in the alternate list.
Using wrong language codes.
Mixing region codes without a reason.
Copying old hreflang links to a new page without updating URLs.
Connect equivalent language pages with hreflang alternate links so search engines understand the multilingual page family.
Login - Jit4All
Login
Welcome back to Jit4All