Skip to content

SiteAddressing

SiteAddressing = { strategy: "invariant"; } | { prefixDefaultLocale: boolean; strategy: "pathPrefix"; } | { hosts: SiteLocaleHost[]; strategy: "localeHost"; }

A site’s locale addressing strategy, as GET /sites reports it.

  • pathPrefix — the locale is the address’s leading segment (/fr/cafes). With prefixDefaultLocale: false the default locale is bare (/cafes); with true it is prefixed too, and a bare request redirects to its prefixed form.
  • localeHost — the locale is the host the page is served under: a subdomain (fr.example.com) or a whole per-locale domain, which are the same strategy with different host strings. hosts maps each host to the locale it serves.
  • invariant — accepted for completeness and treated exactly like an absent member.