How to point a top level domain to a multisite
using a Domain mapping plugin.
Through FTP or your cPanel File Manager
In the wp-content folder create a new folder and name it mu-plugins. (If you already have a mu-plugins folder then skip this step.)
Drag mercator into the mu-plugins folder.
In wp-content create the file sunrise.php. Include the following code:
<?php // Default mu-plugins directory if you haven't set it defined( 'WPMU_PLUGIN_DIR' ) or define( 'WPMU_PLUGIN_DIR', WP_CONTENT_DIR . '/mu-plugins' ); require WPMU_PLUGIN_DIR . '/mercator/mercator.php';
In wp-content. I added the mu-plugins folder. Added the mercator plugin. Then added sunrise.php.
One more thing….
In order for sunrise.php to be loaded, you must add the following to your wp-config.php file:
The domain mapping mu-plugin, the sunrise file and the code to define sunrise in the wp-config file is now in place. We can now move on to adjust the top level domains we want to point to the multisite.
Pointing top level domains to the multisite keeping the original top level name in place.
Log into your web host and go to cPanel (if your host does not use cPanel then ask them how to do the following steps.) Go to Domains -> Addon Domains
I am in the process of adding the domain: theandroidexperience.com as an addon domain.
(Filling out the domain name the username is automatically filled out.)
NB! Be sure to adjust the Document Root to point to your multisite folder. Mine is public_html/mytestingbox
Then fill in a random password and confirm it.
Click add Domain.
If you already have an addon domain you want to point to your multisite folder then locate the domain and click the edit icon below Document Root and adjust to point to your multisite.
Multisite WordPress backend
Go to My Sites -> Network Admin -> Sites -> Add New
Add New (Site)
I am adding the domain: theandroidexperience.com and a site title, and the admin email. Click Add Site.
The new sub site will then be added to the All Sites screen.
Click the site name to edit the site (or use the quick edit and select edit).
Click the tab Aliases.
Then click Add New to create a new alias.
Here is one I made for the domain theandroidexperience.com.
Add the domain name and click the checkbox – Mark alias as active. Then click Add Alias.
Multsite – Add Alias
Check the domain url and see if it works. The addon domain should now point to the multisite folder (mine is public_html/mytestingbox) and through configuring an alias it should now point directly to the sub site. If you deactivate the alias the domain url will then instead go to the main multisite front page.
A huge thanks to support at SiteGround for getting this process to work! Btw here is my affiliate link to SiteGround.
I just found this tutorial: catapultthemes.com/mapping-a-domain-on-wordpress-4-5-multisite/