WPML gives you the option of formatting your language URLs in domains, directories, or as parameters. Learn how it works and find what’s best for you.
WPML lets you choose to format your site’s language URLs using a language argument in the URL, in virtual folders, or different domains (or sub-domains). Internally, all languages are saved in one WordPress database, but for visitors languages can appear to be in different sites.
You can choose the format you want when setting up WPML for the first time. If you would like to change to a different format after setting up WPML, you can do so by going to WPML → Languages and scrolling to Language URL format.
You can choose from the following options:
When you enable languages in directories, you’re telling WPML to arrange translations in what looks like different virtual folders. For example:
To set up your languages in directories, Apache’s rewrite module must be enabled. If you do not have access to your server’s settings, please contact your hosting provider to request them to enable this.
Your site also needs to use a “pretty” permalink structure. You can change your site’s permalink structure in your WordPress settings.
Make sure you’re NOT doing either of the following:
- Creating real directories in your site
You don’t need to create actual directories in your WordPress install, or install WordPress several times. Actually, if you do this, languages in directories will not work.
These directories are virtual. They don’t exist as any physical path.
- Redirecting to other directories
Similar to creating real directories, some users edit their .htaccess files and add redirect rules. You shouldn’t do this. WPML creates its own redirect rules dynamically.
WPML also lets you to display your default language in a directory and select what to show in the site’s root URL.
Read more about placing the site’s default language in a directory.
You can place different languages in completely independent domains. For example:
You can also choose to place different languages in different subdomains. For example:
Choosing this format requires you to set up the proper DNS and server settings. Please see our tutorial for step-by-step instructions on the required server settings for using languages in domains.
If you do not have access to your server settings, please contact your hosting provider for assistance.
Choosing to display the language as a parameter adds the language at the end of your site’s URL. For example:
This format does not require any additional changes to your server settings.