Changing admin sub-domain in WordPress multisite

I have a WordPress multisite installation where the primary domain name is domain1.com. I have two other domain names set as alpha.domain1.com and beta.domain1.com
which both correspond to domain2.com and domain3.com when accessed without logged in.

However when I login to any of these two subdomain sites, the admin is always alpha.domain1.com/wp-admin and beta.domain1.com/wp-admin

How do I make sure that these sub-domains work as domain2.com/wp-admin and domain3.com/wp-admin when logged in.

Just to add more context, the Siteurl and Home are set as alpha.domain1.com and beta.domain1.com for these two individual sites on http://domain1.com/wp-admin/network/site-settings.php

2 Answers
2

There are two commonly used mapping plugins for WordPress. For the next lines we assume you use the free WordPress MU Domain Mapping plugin from the WordPress plugin Repository.

From your post I understand you have correctly mapped your domains (you have a dedicated IP or have already set-up the CNAMEs correctly).
You have also correctly mapped your domains alpha.domain1.com to point to domain2.com and made domain2.com the primary domain.

mapping-01

What you are asking for is possible. You just need to make the correct configuration.

How to have the administration pages redirect to the mapped domain:

mapping02

  • Go to your “Network Settings” and click on “Domain Mapping“.
  • Check the two options as at the image above. You don’t need to have anything else checked.
  • Make sure you leave unchecked the
    Redirect administration pages to network’s original domain“.

If you read the installation page:

  1. “Redirect administration pages to network’s original domain (remote
    login disabled if this redirect is disabled)” – with this checked, if
    a user visits their dashboard on a mapped domain it will redirect to
    the dashboard on the non mapped domain. If you don’t want this, remote
    login will be disabled for security reasons.

Do a final check by going to “Network Settings“, “Sites“, “Edit Site“, “Settings“.
Make sure both your “Siteurl” and “Home” fields point to your mapped domain.

mapping-03

The second mapping plugin is a paid one. You can find information on how to use it here.
If that is the one you use, under “Administration mapping” you should select
one of the two options provided.

  • domain entered by the user” gives the choice to the mapped site admin to point the administration area to either the mapped domain (domain2.com/wp-admin/) or the original domain (alpha.domain1.com/wp-admin/).
  • mapped domain” enables the access to the admin area through the mapped domain (domain2.com/wp-admin/).

Leave a Comment