WordPress Multisite With Top Level Domain Names (TLDs)

The question of “How can I WordPress Multisite With Different Domain Names?”, seems to come up rather frequently.  There always seems to be a bit of confusion on this topic as well.

The WordPress Codex illustrates multisite to be used for subdirectories and subdomains of a single Top Level Domain (TLD). Granted, this is WordPress’s intended purpose for Multisite, it doesn’t mean that you CAN’T use multisite for TLD’s.

A lot of people seem to think that it’s a REQUIREMENT to use a 3rd party plugin in order to pull off using WordPress Multisite with TLD’s. Let me tell you, that’s absolutely NOT the case. There’s no requirement for third party plugins for use TLD’s with WordPress Multisite.

Why Use WordPress Multisite?

I’m not going to go into great detail about why you should use multisite in this article, but I do want to touch base on the basic reasons why I think it’s beneficial to use multisite to manage multiple WordPress websites.

  1. If you’re maintaining multiple WordPress websites, you’re probably well aware of how much time is consumed with updating the core WordPress platform, along with any additional WordPress Plugins or WordPress Themes associated with each WordPress website. It can become a rather tedious process to keep everything updated and consistent across all websites that you manage.
  2. By now, you probably use some kind of “Framework” or “toolset” of plugins / themes to keep all of your websites structurally similar behind the scenes. This makes maintaining your websites a lot easier, right? WordPress multisite can help improve that process.
  3. You probably also notice once you begin to have several WordPress websites on a single Web Server, how much of a load that can produce. WordPress multisite can help reduce server resource consumption as well.

When Not to Use WordPress Multisite

  1. There are several reasons why you shouldn’t use WordPress Multisite. The biggest concern would be security, but I’m not going to get into all of the reasons why you shouldn’t use multisite right now. You can Google that, or perhaps I can elaborate more on that subject in a separate article another time.
  2. If you’re the only one with access to the Web Server and Database Server, then those security concerns are basically nothing to lose sleep about.

How to Use WordPress Multisite With Different Domain Names

Step 1 – Install WordPress and Enable WordPress Multisite

  • If you’re unsure about how to install WordPress, click here.
  • If you’re unsure about how to enable WordPress Multisite, click here.
  • * Note: It’s important that you configure WordPress Multisite to function as a “subdomain” based network.

** Note: I’ve experienced some strange behavior when using TLD’s with a subdirectory configuration. Switching over the the subdomain configuration instantly remedied the bizarre problems I’ve encountered.

Step 2 – Edit wp-config.php in the Base Directory of Your WordPress Installation

Here’s an example of how my wp-config.php file looks like (related to configuring WordPress as subdomain network):

* Note: Replace www.primary-domain.com with the “Master domain”. I would recommend making sure this domain has it’s own Virtual Host on your Web Server. Each extra TLD you add to your network can simply be a Domain Alias of your Master Domain’s Virtual Host file. More on this further down the article.

** Note: Feel free to add each extra TLD in your network as a Virtual Host, just make sure that the Document Root is set to the same location of the Primary Domain.

in order to get TLD’s to behave properly, make some additional configurations to the wp-config.php file like this:

Step 3 – Edit .htaccess in the Base Directory of Your WordPress Installation

Here’s the basic configuration for your .htaccess file as a subdomain network:

Note: If the above code isn’t working for your .htaccess file, please check the WordPress Codex :: .htaccess for any updates which may have occurred since my article was published.

Extra Notes on Using TLD’s With WordPress Multisite

Personally, I like to have one single Apache Virtual Host for the Primary Domain in the network and then configure that Virtual Host with Alias Domains. Each Alias Domain being one of the additional sites in your network.

  • You need the DNS for each domain name in your network to resolve to the same Web Server.
  • Each domain name needs to have the same Document Root as the Primary Domain.

Once you’ve got everything configured and setup properly as discussed above. Log into your WordPress administration area and navigate to the Network administration area to add a new site into your network.

When you go to add a site, it will force you to add the website as if it were a subdomain under your Primary Domain. Just roll with it. Enter something temporary.

Once the site has been added, then go find it under the list of sites in your network. Click edit on that specific site. Now, you can fully 100% change the domain name of that website. That’s when you would put the actual domain name for this TLD site.

I know it’s a bit of trickery to do it that way, but it works and you don’t need to use any plugins.

Please comment and share.

Credits

Original question asked by @Kevin.a on WordPress Stack Exchange: WordPress Multisites with different domain names.
Answer to Question: WordPress Multisites with different domain names by @Michael Ecklund on WordPress Stack Exchange.

Related Questions

This article assists in answering all of the following related questions:

  1. [WordPress Development] WordPress Multisites with different domain names asked by: @Kevin.a
  2. [WordPress Development] Multiple blogs, different domain names, one install to rule them all asked by: @cpara
  3. [WordPress Development] How to use alias domain for multisite installation? asked by: @Demilio
  4. [WordPress Development] How to have in wordpress multisite a subsite page served using two different domains asked by: @mcartur
  5. [WordPress Development] How to add new sites and map a custom domain in WordPress Multisite? asked by: @Bikram Pahi
  6. [WordPress Development] Is it still only possible to do multisite domain mapping with a plugin in WordPress 4.1? asked by: @codecowboy
  7. [WordPress Development] WordPress multisite with multiple parent domains asked by: @Thomas
  8. [WordPress Development] WP 4.4 – domain mapping for sites within a multisite network? asked by: @C C
  9. [WordPress Development] Domain mapping (without plugin) in 4.5.x multisite? asked by: @C C

Leave a Reply