Skip to content

Domain Mapping Without a Plugin for WordPress Multisite Installation

Domain mapping for WordPress multisite installation used to require a plugin such as “WordPress MU Domain Mapping” (free) or  “Domain Mapping” (premium plugin good for automation and monetizing network) or “Pronamic Domain Mapping” (free).  That is no longer the case. The following variations are domain mapping solutions for a subdomain multisite that don’t require a plugin.

All solutions have in common the need to add the following code to your wp-config.php file:
define( ‘COOKIE_DOMAIN’, $_SERVER[ ‘HTTP_HOST’ ] );

Fresh installations of WordPress 4.x and up makes it easy for you to map domains to a multisite without a plugin. Here are a few variations…

Dedicated IP – Subdomain Mapping to WordPress Multisite

Advantages: Quick and easy. Fairly automatic once set up.

Disadvantages: If ip address is changed, each domain will need to be pointed to the new IP. This can be a problem if you don’t control access to the domains’ DNS’s.

  1. Have a dedicated ip specific to your WordPress Multisite installation. (no other websites should reside at that ip.
  2. Add wildcard DNS A record * for multisite domain and point it to its dedicated IP
  3. Multisite Dasboard -> My Sites -> Network Admin -> Sites -> edit url to http://example.com or https://example.com
  4. Point each new example.com to the dedicated ip
  5. Add the following to your wp-config.php file: define( ‘COOKIE_DOMAIN’, $_SERVER[ ‘HTTP_HOST’ ] );

Addon Domain / No Dedicated IP – Subdomain Mapping to WordPress Multisite

Advantages: No need for dedicated IP

Disadvantages: Each domain will need to be added on at multisite server. If IP address is changed, each domain will need to be pointed to the new IP (This can be a problem if you don’t control access to the domains’ DNS’s).

  1. Add wildcard DNS A record * for multisite domain and point it to its IP
  2. Control Panel for multisite website -> Addon Domain -> example.com -> subdomain will be example.your-website-example.com -> directory will be the root directory -> create
  3. Network Admin -> Sites -> edit url to http://example.com or https://example.com
  4. Add the following to your wp-config.php file: define( ‘COOKIE_DOMAIN’, $_SERVER[ ‘HTTP_HOST’ ] );

Parked Domain (Alias Domain) / No Addon Domain / No Dedicated IP – Subdomain Mapping to WordPress Multisite

Advantages: If multisite IP changes, no changes are required for mapped domains. No need for dedicated IP or Addon domain

Disadvantages: You are now the administrator of the parked domain’s dns settings for email and other such records. Parked domain’s DNS records need to be mapped to new DNS servers.

    1. Add wildcard DNS A record * for multisite domain and point it to its IP
    2. Control Panel for multisite website -> Parked or Alias -> example.com -> subdomain will be example.your-website-example.com -> directory will be the root directory -> create
    3. Change DNS servers at the parked domain to be the multisite’s DNS servers
    4. Network Admin -> Sites -> Edit -> Settings tab -> Set Site Url to read parked-domain.com/multisite-dir/  and Set Home to read parked-domain.com
    5. Add the following to your wp-config.php file: define( ‘COOKIE_DOMAIN’, $_SERVER[ ‘HTTP_HOST’ ] );
    6. Add the following to multisite’s ROOT .htaccess:

RewriteRule ^parked-directory – [L] RewriteCond %{HTTP_HOST} ^(www\.)?parked-domain\.com$ [NC] RewriteRule ^(.*)$ parked-directory/$1 [L]

 

 

Menu Title
Scroll To Top