SEO – International SEO and Hreflang
If your website has content in more than one language, or for more than one country, search engines must know which version to show to which user. A person in France should see the French page, and a person in the USA should see the English one. The hreflang attribute is used for this.
Ways to structure a multilingual site
| Structure | Example | Notes |
|---|---|---|
| Country domain (ccTLD) | example.fr, example.de | Clear signal for a country, but each domain needs its own work |
| Subdomain | fr.example.com | Easy to separate, but it is treated more like a different site |
| Sub folder | example.com/fr/ | Easy to manage and keeps the authority of one domain. Common choice |
The hreflang tag
Put these tags in the head of each page. Each version lists all the versions, including itself.
<link rel="alternate" hreflang="en" href="https://example.com/seo-guide/">
<link rel="alternate" hreflang="fr" href="https://example.com/fr/guide-seo/">
<link rel="alternate" hreflang="hi" href="https://example.com/hi/seo-guide/">
<link rel="alternate" hreflang="x-default" href="https://example.com/seo-guide/">
- The language code is in ISO 639-1 (
en,fr,hi). You can add a country in ISO 3166-1, likeen-gboren-in. The language always comes first. x-defaultis for users whose language is not listed, for example a language selector page.- The links must be reciprocal: if page A points to page B, page B must point back to page A. Otherwise the tags can be ignored.
- Every page should include a tag for itself (self reference).
- Use full absolute URLs.
Other ways to add hreflang
- In the HTTP header, for files like PDF.
- In the XML sitemap, with
xhtml:linkentries. This is useful for big sites.
Tips for international sites
- Translate the content by a human or check it well. Machine translation without review gives poor quality.
- Translate also the title, description, URL slug and image alt text.
- Do not redirect users automatically by their IP address or browser language. Search bots may not see all versions. Offer a language switcher instead.
- Use a
langattribute in the html tag:<html lang="fr">. - Each language version should have a self canonical tag, not a canonical to the main language. See Canonical URLs.
Note:
Hreflang does not improve rankings in itself. It helps to show the right version of the page to the right person. Next: Backlinks.
Congratulations! Chapter Finished. Learn more about the similar topics:
| Exercises & Assignments |
|---|
| No Content Found. |
| Interview Questions & Answers |
|---|
| No Content Found. |