Fixing the WordPress multisite master hostname

There is an unfortunate design choice in WordPress, where the ‘Network Admin’ site is assigned to the www. hostname of a wildcarded domain.

This is a poor choice because almost invariably the Site administrator will want to assign the www. hostname to an IP address available on the internet.

To allow master.example.com to be the Network Admin default site it is necessary to change the

files of your WordPress installation.

As of WP-4.4.2 the change looks like this:

Then also define the constant COOKIE_DOMAIN in wp-config.php.

If you are correcting this from a default installation it may be necessary to also adjust the database, as documented here ==> How to change a Multisite primary domain, and elsewhere.