Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,113 of 9,113 pages
About the help in other languages
All help pages

Language addresses: path or host

How to give each language of a public site its own address in Exponential (a path such as /fr/, a host such as fr.example.gov, or both), the matching settings for each, and how to choose for a public body.

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/government/languages/language-addresses-path-or-host.md

On this page

Language addresses: path or host

This page is for administrators and site builders who decide how the language versions of a site are addressed. Exponential decides which siteaccess answers a request by matching the address; the settings are in site.ini [SiteAccessSettings] (Language switchers and addresses per language, 10.2 Siteaccesses and site addresses).

Contents

  1. The three shapes
  2. Choosing for a public body
  3. Path per language
  4. Host per language
  5. Test hosts
  6. After the change

The three shapes

ShapeExampleSet up with
Path per languagewww.example.gov/fr/MatchOrder=uri, URIMatchType=element, siteaccess named fr or a map
Host per languagefr.example.gov, or a separate domain per languageMatchOrder=host, HostMatchMapItems[]=fr.example.gov;site_fr
Host and pathwww.example.gov/fr on one host, other hosts elsewherehost_uri with HostUriMatchMapItems[]

Choosing for a public body

ConsiderationPathHost
Certificates and DNSone hostone name per language
Equal standing of official languagesthe default language often has no prefix; give every language a prefix to avoid ranking one firsteach language has its own name
Analytics and logsone host, filter by pathseparated by host
Moving laterchanging scheme needs redirectssame

Whichever you choose, use it everywhere and do not change it after launch without a redirect plan.

Path per language

# settings/override/site.ini.append.php
[SiteAccessSettings]
AvailableSiteAccessList[]=en
AvailableSiteAccessList[]=fr
RelatedSiteAccessList[]=en
RelatedSiteAccessList[]=fr
MatchOrder=uri
URIMatchType=element
URIMatchElement=1

With siteaccesses named en and fr, /en/... and /fr/... reach them. Keep the entries the installer wrote for the administration.

Host per language

[SiteAccessSettings]
MatchOrder=host
HostMatchType=map
HostMatchMapItems[]=en.example.gov;site_en
HostMatchMapItems[]=fr.example.gov;site_fr

Add each host to DNS, the web server or Velocity, and the certificate (Going live: hosts, HTTPS and siteaccesses).

Test hosts

HostMatchMethod=start lets a test host such as fr.example.gov.test.local reach the same siteaccess as fr.example.gov; methods strict (default), start, end and part exist, globally or per entry. Use start and part only where the web server answers for your own hosts alone (Siteaccess by host prefix).

After the change

Clear the INI cache (php bin/php/ezcache.php --clear-tag=ini) and, with Velocity, its response cache. Open each language address signed out and check <html lang="..."> on the page.

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x