Multi Domain Language Switch
Bind each language of a site to its own domain.
Jahia resolves a hostname to a site; the language then lives in the URL path, as a language segment or a vanity URL. Nothing ties a language to a host, so a site with fr on www.example.fr and de on www.example.de is not something the platform supports on its own. This module supplies the two halves that are missing.
A language switch menu whose links each carry the hostname registered for their language, so switching language moves the visitor to the right domain on the same page. Labels are endonyms — "Deutsch", not "German" — and the current language is marked for assistive technology as well as visually.
A redirect that gives every language one entry domain: a page requested in a language mapped elsewhere answers a 302 to the same path on the right host. It decides on the language of the page being served, not on the shape of the URL, so vanity URLs are preserved rather than replaced by a technical path.
If the site-settings-seo module is installed, the hreflang alternates and the canonical link it generates are rewritten to the host mapped to each language, so search engines stop being told that every language lives on one domain.
Configuration is one base URL per language, in Administration → Sites → Language URL mapping, guarded by its own permission. The mapping does not have to be one domain per language: several languages can share a host while others get a dedicated one.
When you do not need it. One domain with several languages is Jahia's native model and the standard language switcher already covers it. One language per site with its own server name is standard multi-site. A prettier URL for a language is what vanity URLs are for. This module addresses the remaining case: one site, several languages, and domains that differ per language.
Requires Jahia 8.2. MIT licensed. Source, documentation and issue tracker: https://github.com/Jahia/multiDomainLanguageSwitch/
Screenshots
How to install
How to install
- Download multi-domain-language-switch-x.x.x.jar from the release page, or install the module from this store entry.
- If installing manually, drop the JAR into digital-factory-data/modules/.
- Enable the module on your site: Administration → Sites → your site → Modules.
- Declare every hostname you intend to map on the site, as its server name or in its server name aliases (Administration → Sites → your site → Web Projects), and make sure each one resolves to the Jahia instance. A hostname Jahia does not know answers 404 before the module is ever consulted.
- Open Administration → Sites → your site → Language URL mapping and enter one base URL per language, for example https://www.example.fr. A scheme and a host, with a port if it is not the default; leave a field empty to keep the site's default URL for that language.
- Drop the Language switch menu component into your templates where the switcher belongs.
Optional: install site-settings-seo to get hreflang and canonical links in the page head — this module then rewrites them to the right domain per language.
Both filters run in live mode only. Editors keep local links and are never redirected to another domain, so test the behaviour on the live site.
Using the component from your own module, or restyling it, is covered in INTEGRATION.md.
FAQ
Can several languages share one domain? Yes. The mapping is not one-to-one — point as many languages as you like at the same host, and they are told apart by the language segment, exactly as in a standard Jahia site. Languages sharing a host never redirect between themselves.
Which port do I put in the mapping? The public one, the one visitors reach — never Tomcat's internal port. And make sure Jahia sees the client scheme and port: behind a proxy that terminates TLS without forwarding them, the host/port comparison produces a redirect loop. This is the single most common misconfiguration; the FAQ in the repository explains the fix.
Does it work with vanity URLs? Yes, in both directions. Vanity URLs appear as-is in the menu links, and a vanity URL requested on the wrong domain is redirected to the same vanity URL on the right one.
What exactly does the mapping accept? A scheme, a host, and an optional port. A path, a query string, credentials, and anything that is not http or https are refused. The value is parsed and rebuilt from its components, which is a security boundary, not tidiness: it ends up in the href of every link on a live page.
Does it work behind a CDN? Yes, with four things to get right — the client scheme reaching Jahia, the Host header preserved, Host included in the cache key, and a purge after a mapping change. All four are detailed in the repository FAQ.
Is it accessible? It targets WCAG 2.2 AAA. The menu deliberately imposes no colour and no font so that it inherits your design system, which means text contrast is yours to verify; everything the module can guarantee without knowing your palette — focus indicator, target size, non-colour state indicators, BCP 47 language attributes, endonym labels — it ships.
Why not flags? A flag is a country, not a language. fr and fr_CH break that metaphor immediately, and that is precisely the case this module exists for.
Full FAQ, including local testing with several domains: https://github.com/Jahia/multiDomainLanguageSwitch/blob/main/FAQ.md
MIT License
Copyright (c) 2026 Jahia Solutions Group SA
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.