# Strapi hreflang

> Strapi

Canonical: https://scaplet.com/seo/strapi/hreflang

Guide Strapi Strapi · International SEO

Strapi's i18n feature stores locales, but docs do not mention hreflang. Set up locales, fetch each one, and emit hreflang from your frontend.

3 min

read

3

sources

Oct 30, 2026

updated

Scaplet Editorial Team

author

In one line

Strapi's Internationalization feature manages locales and localized content, but its docs do not mention hreflang, so your frontend has to emit the tags. Add locales under Settings > Global Settings > Internationalization, enable localization on the content type, then output one alternate link per published locale, including a self-reference.

30-second check

## Where does your site stand?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?

Summarize this page with [ChatGPT](https://chatgpt.com/?hints=search&q=Summarize%20https%3A%2F%2Fscaplet.com%2Fseo%2Fstrapi%2Fhreflang%20(%22Strapi%20hreflang%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Claude](https://claude.ai/new?q=Summarize%20https%3A%2F%2Fscaplet.com%2Fseo%2Fstrapi%2Fhreflang%20(%22Strapi%20hreflang%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Perplexity](https://www.perplexity.ai/search?q=Summarize%20https%3A%2F%2Fscaplet.com%2Fseo%2Fstrapi%2Fhreflang%20(%22Strapi%20hreflang%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [![Google](/logos/ai/google-color.svg)AI Mode](https://www.google.com/search?udm=50&q=Summarize%20https%3A%2F%2Fscaplet.com%2Fseo%2Fstrapi%2Fhreflang%20(%22Strapi%20hreflang%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.)

On this page

## 4 parts, 3 minutes.

1. [What Strapi gives you, and what it does not 01](#what-strapi-gives-you-and-what-it-does-not)
2. [Set up locales and fetch each one 02](#set-up-locales-and-fetch-each-one)
3. [Emit hreflang from the frontend 03](#emit-hreflang-from-the-frontend)
4. [Check it worked 04](#check-it-worked)

_01_Strapi i18n versus hreflang, from Strapi's docs

## What Strapi gives you, and what it does not

| Need | Strapi | Source |
| Add locales | Yes - Settings > Global Settings > Internationalization | Internationalization docs |
| Custom locale codes | No - "It is not possible to create custom locales." | Internationalization docs |
| Localize a content type or field | Yes - tick Internationalization in the Content-type Builder's Advanced settings, then "Enable localization for this field" | Internationalization docs |
| Publish one language at a time | Yes - publishing applies only to the locale you are working in | Internationalization docs |
| Fetch one locale over REST | Yes - the `locale` parameter | REST locale docs |
| Output [hreflang](/glossary/hreflang) tags | Not documented - the i18n page does not mention hreflang | Your frontend |

By default only the English locale is configured, and only one locale can be the default for the whole application. An omitted `locale` parameter returns the default locale.

_02_How it works

## Set up locales and fetch each one

Strapi's REST locale example

```
curl 'http://localhost:1337/api/restaurants?locale=fr' \ -H 'Authorization: Bearer <token>'
```

**AI translations overwrite manual edits**If you enable AI-powered internationalization, Strapi says manual modifications made to other locales will be overwritten when you edit the default locale. Treat the default locale as the source of truth before you rely on hand-tuned titles.

1. 01

### Add locales

Go to Settings > Global Settings > Internationalization and add the locales from Strapi's pre-created list. Pick the default carefully, since only one can be the default.
2. 02

### Enable localization on the content type and fields

In the Content-type Builder's Advanced settings tab, tick Internationalization on the content type, and Enable localization for this field on each field that varies by language.
3. 03

### Create and publish each translation

In the Content Manager, use the locale drop-down at the top right of the edit view to switch language. Fill in from another locale copies values across. Publish each locale separately.
4. 04

### Request a locale

Pass the `locale` parameter on the REST API, as in the example below.

_03_Checklist

## Emit hreflang from the frontend

Google lists three ways to indicate alternate versions: HTML tags, HTTP headers, or an [XML sitemap](/glossary/xml-sitemap). Strapi's docs cover none of them, so choose one in your frontend. The rules come from Google: each language version must list itself and all other versions, alternate URLs must be fully qualified including http or [https](/glossary/https), and "If two pages don't both point to each other, the tags will be ignored."

1. 01 Build the list from the locales you have actually published for that entry, so you never link to a locale that returns a 404.
2. 02 Use only ISO 639-1 language codes and ISO 3166-1 Alpha 2 region codes. Google says codes such as es-419 are not supported.
3. 03 Google says the reserved `x-default` value is used when no other language or region matches the visitor.
4. 04 Make sure the locale codes you configured in Strapi map cleanly to those hreflang values, since Strapi's pre-created list is the only source of locale codes.

One page in three locales (example URLs)

```
<link rel="alternate" hreflang="en" href="https://example.com/en/pricing" /> <link rel="alternate" hreflang="fr" href="https://example.com/fr/tarifs" /> <link rel="alternate" hreflang="x-default" href="https://example.com/en/pricing" />
```

_04_How it works

## Check it worked

1. 1

### Read the rendered head

View source on one page in each locale and confirm it lists itself plus every sibling.
2. 2

### Follow every alternate

Open each alternate URL and confirm it returns 200 with that locale's content and links back to the others.
3. 3

### Compare with the API

Request each locale with `?locale=` and confirm each is published, since the Content Manager publishes per locale.

More on the [markup](/glossary/structured-data) in the [hreflang glossary entry](/glossary/hreflang), and on the title and description side in [Strapi title and meta](/seo/strapi/title-and-meta).

Related Strapi guide: [Strapi title tags and meta descriptions](/seo/strapi/title-and-meta).

Questions

## Asked a lot.

2 questions people ask next, answered from the sources on this page.

_01_ Does Strapi add hreflang tags?

Strapi's Internationalization docs do not mention hreflang. Your frontend has to output the tags using the locales Strapi stores.

_02_ Can I create a custom locale in Strapi?

No. Strapi's docs say it is not possible to create custom locales; you choose from its pre-created list.

Sources · 3

## Every fact, linked and dated.

Official docs first. The date is when we last opened each page.

- strapi.io
- google.com

1. 01 [Internationalization (i18n) | Strapi Docs](https://docs.strapi.io/cms/features/internationalization) docs.strapi.io · checked 2026-11-01
2. 02 [REST API: locale | Strapi Docs](https://docs.strapi.io/cms/api/rest/locale) docs.strapi.io · checked 2026-11-01
3. 03 [Localized versions of your pages | Google Search Central](https://developers.google.com/search/docs/specialty/international/localized-versions) developers.google.com · checked 2026-11-01

## Keep learning

[All platform guides](/seo)

[Learn Strapi title and meta Headless CMS](/seo/strapi/title-and-meta) [Related Hreflang return links International](/seo-issues/hreflang-missing-return-links) [Read next Drupal SEO Content management systems](/seo/drupal) [Do Run a free site audit Free, about two minutes](/site-audit)

Nearby in platform guides
[Squarespace title tags and meta descriptions](/seo/squarespace/title-and-meta) [Squarespace XML sitemap](/seo/squarespace/xml-sitemap) [SvelteKit redirects](/seo/sveltekit/redirects)

More in Headless CMS
[Strapi hreflang](/seo/strapi/hreflang) [Strapi title and meta](/seo/strapi/title-and-meta)

Terms on this page
[Hreflang](/glossary/hreflang) [XML sitemap](/glossary/xml-sitemap) [HTTPS](/glossary/https) [Structured data](/glossary/structured-data)

Free · 2 minutes

## Tools point. Agencies advise. _This one ships._

Run the free audit, then approve the fixes. Every change can be undone.

[Audit my site free](/site-audit)

Free, no card 60 seconds Nobody will call you

- **46** fixes shipped without a ticket Brightpipe
- **0→7** ChatGPT citations in six weeks Paylane
