Domain Mapping is a popular plugin, which allows running multiple, independent sites (each with its own domain), from a single Network-enabled WordPress install. We’ll explain how to use Domain Mapping with WPML.


  • WordPress
  • Domain Mapping 0.5.4+
  • WPML, configured with languages in directories

Our demo network consists of these sites:

  • tenalpa.commain site
  • /
  • /
  • /

If you’re not familiar with Domain Mapping, the way it works is by mirroring subdomains, which WordPress assigns in Network mode, to completely independent domain. In our example, the native subdomains are Domain Mapping maps them to, and

Domains list

You can control this mapping from the Domain Mapping admin screen:
Network Admin->Setting->Domain Mapping

Setup Steps

Most of these steps are not related to WPML. In fact, WPML doesn’t really care much about the Domain Mapping plugin. Domain Mapping decodes the domain and WPML looks at the URL for each page. We’re including here the full list of steps, so that it serves as a complete guide.

Point all sub-sites to the same WordPress install

You need to tell Apache (or whatever web server you’re using) to point all domains to the same physical WordPress install. We do this using the DomainAlias instruction.

This is our Apache configuration file:

  DocumentRoot OUR_SERVER_DIRECTORY/domain-mapping-test/wordpress

  <Directory OUR_SERVER_DIRECTORY/domain-mapping-test/wordpress>
    Options FollowSymLinks
    AllowOverride Limit Options FileInfo
    DirectoryIndex index.php


Add the required directives to wp-config.php

The setup process, required to convert a single-site to a network site, will give you specific instructions. This is what we have:

define( 'MULTISITE', true );
define( 'SUBDOMAIN_INSTALL', true );
$base = '/';
define( 'DOMAIN_CURRENT_SITE', '' );
define( 'PATH_CURRENT_SITE', '/' );
define( 'SITE_ID_CURRENT_SITE', 1 );
define( 'BLOG_ID_CURRENT_SITE', 1 );
define( 'SUNRISE', 'on' );

Add the required directives to .htaccess

Again, you’ll get specific instructions for your site. This is what we’ve added to .htaccess:

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]

# uploaded files
RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule . index.php [L]

Settings in WordPress Admin

Finally, you need to configure the Domain Mapping plugin and WPML.

In WPML, the only required setting is in WPML->Languages. Select ‘Languages in directories’. When you use Domain Mapping, you cannot also have languages in domains.

When enabling Multisite, we choose to have different child sites in subdomains.

For Domain Mapping, we have the following settings:
  • IP address users need to point DNS A records or the domain to paoint CNAME record at (happens to be our IP address)
  • Domain Options (I left these to default settings as below)
  • Remote Login Checked
  • Permanent redirect (better for your blogger’s pagerank) Not Checked
  • User domain mapping page Checked
  • Redirect administration pages to site’s original domain (remote login disabled if this redirect is disabled) Checked
  • Disable primary domain check. Sites will not redirect to one domain name. May cause duplicate content issues. Not Checked

Domain Mapping Configuration

The results

As you can see, all child sites perform normally.

For instance:


If you need help getting Domain Mapping to work with WPML for your own site, please start a new thread in our technical support forum.

Appendix – Domain Mapping Patches

We’re using the current development version of Domain Mapping. Unrelated to WPML, we found that this patch helps prevent some of the obvious problems that we encountered between Domain Mapping and WordPress 3.3:


if ( false == isset( $_SERVER[ 'HTTPS' ] ) )
			$_SERVER[ 'HTTPS' ] == 'Off';


$protocol = ( 'on' == strtolower( $_SERVER[ 'HTTPS' ] ) ) ? 'https://' : 'http://';


$protocol = 'http://';

This is by no means serious debug of the root of these problems. We know that we merely disabled a mode that we don’t need and is causing us trouble.