Add hreflang tags for English and French pages
Description: The English page is https://example.com/guide/ and the French page is https://example.com/fr/guide/. Add the hreflang tags.
Hint:
- Every version must list both versions, including itself.
Solution
<!-- In the head of BOTH pages -->
<link rel="alternate" hreflang="en" href="https://example.com/guide/">
<link rel="alternate" hreflang="fr" href="https://example.com/fr/guide/">
<link rel="alternate" hreflang="x-default" href="https://example.com/guide/">
How it works
- The links are reciprocal, so Google can trust them.
x-defaultis for users whose language is not in the list.
Read International SEO and Hreflang.
Learn more about the similar topics:
| Tutorials |
|---|
| No Content Found. |
| Exercises & Assignments |
|---|
| No Content Found. |
| Interview Questions & Answers |
|---|
| No Content Found. |