I have my maindomain.com set up as a multisite.

niceblog.maindomain.com will stay as it is and it works, that's fine.

Now for the secode site of my multisite which is clientblog i want to map a domain from somewhere else so that greaterblog.maindomain.com is set up with the Wordpress MU Domain Mapping plugin to be mapped as blog.clientdomain.com

So i would hav 2 sites on my multisite installation

  • niceblog.maindomain.com

  • blog.clientdomain.com

I tried to redirect blog.clientdomain.com as a CNAME to the clientblog.maindomain.com and also tried the A IP DNS redirect to my IP.

With both configuration it returns a 404 error when i visit blog.clientdomain.com.

Although when i do a ping to it, it returns the correct IP.

  • i am on a shared host but i don't think it could be that
  • can it be the .htaccess ?

Any idea on how i can make it work?

1 Answer 1


i am on a shared host but i don't think it could be that

First, do you have access to the hosting service in such a way that you can map the VirtualHost of the blog.clientdomain.com to your webserver?

If not, then you're screwed and no amount of WordPress trickery will do the job.

Webservers work like this (greatly simplified):

  • A browser tries to go to a site.
  • The DNS points it to an IP for that site.
  • The browser sends a http request to that site saying "give me this site".
  • The webserver looks in its config files, finds the entry for that site (domain name, path, etc) and sees that to serve that site it needs to look in /some/file/path/on/the/server.

The VirtualHost points a URL/path to a directory, more or less. It's a bit more complex than that but not much. The short of it is that you need your webserver, outside of WordPress itself, to know that it needs to direct requests for this site to your WordPress install.

If you can't do that, then you just can't do it at all.

Once you have that working, but don't have the domain setup yet, then the webserver will direct those requests to your WordPress install. But since WordPress doesn't know about that domain, it'll just redirect you to the main site instead, because that is sort of the default fallback position.

Basically, if you have the DNS working, then you don't get your main blog, then you need to setup the VirtualHost to point that domain to your existing install. Once that works, once it's loading your page and not some 404, only then can you do Multisite Domain Mapping. Then the standard domain mapping tutorials will work.

How do you do the VirtualHost? On shared, you might not be able to. Ask your host.

  • I'm pretty familiar with the Virtual Host concept. The subdomains work as long as i'm on my own server (i created those subdomains in my webhost interface etc and it works). I don't have access to the Virtual Host for now. But even if i did i don't see how it could resolve my problem. On one hand i defined the external domain in my wordpress install. In the other hand i created a CNAM redirection from the external (client) domain to my domain. Sould i be able to change Virtual Host config on the wordpress install's webserver on the client's one?
    – Julien G
    Nov 17, 2017 at 11:30
  • The question is whether or not going to the domain points at your WordPress site or not. If not, then this isn't a WordPress problem and you may need to adjust the webserver config to make it point to the WordPress install itself.
    – Otto
    Nov 17, 2017 at 19:56
  • I recreated a similar install on my own server (with more privileges as server admin etc.) and managed to get it right. So indeed i have to look into solving this server/host side. Thanks for guiding me, it made things clearer ! (marking this resolved even if my quest continues ahah)
    – Julien G
    Nov 18, 2017 at 16:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.