How to point a top level domain to a multisite
Update 3 April 2020.
It is a lot easier to use top level domains in a multisite these days in WordPress 5.4 then it was earlier.
I just had to log in to my host. Go to a subdomain.
Example bluewinddesign.easywebdesigntutorials.com which is the subdomain for bluewinddesign.com.
Then adjust the Document root.
Example /public_html/dev/earthwinddesign.com to instead point to the multisite: /public_html/dev/mytestingbox.com
After that I logged into the multisite. I added a subsite and went to edit it.
I changed it to https://bluewinddesign.com
I then went to the domain bluewinddesign.com and noticed it was a part of the multisite.
using a Domain mapping plugin.
Through FTP or your Web Host control File Manager area.
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 the Mercator-master zip file into the mu-plugins folder. Then extract (unzip). Rename the extracted folder to mercator and delete the zip folder.
In wp-content folder 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. Here is the mu-plugins folder with the extracted mercator plugin folder. Then the file sunrise.php.
In order for sunrise.php to be loaded, you must add the following to your wp-config.php file:
(Your wp-config file might look a little different.)
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.
cPanel (or other control panels)
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.)
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/