Multisite with Different Domains

This question is similar to Multisite with entirely different domains? which was not answered. I am re-asking.

I want to host multiple domains using WP multisite, which is installed and working normally in “multiple subdomains” mode. This creates multiple WP sites like

site1.domain.com
site2.domain.com

I want to use

www.domain1.com
www.domain2.com

I’ve tried the WordPress MU domain mapping plugin but I’m not satisfied with its behavior. This plugin seems to simply redirect the user, ie. the user enters

www.domain1.com

and the browser is sent to

site1.domain.com

I don’t want the user to know they aren’t on domain1.com.

I also tried setting up VirtualHosts in Apache:

<VirtualHost *:80>
   ServerName site1.domain.com
   ServerAlias domain1.com
   ServerAlias www.domain1.com
</VirtualHost>

But this also seems to produce a redirect to

site1.domain.com

in the users’s browser.

2 Answers
2

Domain mapping is the correct answer to your question, because that isn’t how the domain mapping plugin works at all.

Take a look at http://ottopress.com. It really lives at http://ottodestruct.com/op/, but you wouldn’t know it, would you? It’s a domain mapped site on a multisite installation.

If you’re getting a redirect to the wrong URL, check to be sure that you set up the new domain as the “primary” in the domain mapping. The primary one is the one that the others will redirect to.

Leave a Comment