I'm running a Wordpress multisite install where the blogs are created in subdirectories - e.g. www.mydomain.com/blog1, www.mydomain.com/blog2

I need to clarify what I think is and isn't possible with domain mapping so that clients can use their own domain (and therefore improve their SEO) for the blog.

What I want in an ideal world is for www.clientdomain.com/blog to serve the respective Wordpress blog (e.g. www.mydomain.com/blog6) BUT as far as the user is concerned, they are looking at www.clientdomain.com/blog.

I know this is possible with subdomain mapping (e.g. I can serve www.mydomain.com/blog6 as blog.clientdomain.com) but is there any solution for making a subdirectory of one domain serve a website on another domain?

I don't think this is possible without using 301 redirects in .htaccess but just need someone to confirm this for me.

In summary, I believe my options are:

  1. User types www.clientdomain.com/blog and browser loads www.mydomain.com/blog6 (address bar also shows www.mydomain.com/blog6) using .htaccess redirect 301.

  2. User types blog.clientdomain.com and browser loads www.mydomain.com/blog6 (address bar remains blog.clientdomain.com) using domain mapping DNS.

For more information, hosting for wordpress multisite and client website is completely different and client website will have a "normal" site plus email in addition to their blog.

Thanks for your help.


You need need to add an vserver with the document root set to the root of the blog (say for example /var/www/blog6) and the vserver name to blog.clientdomain.com. That should do what you want.


What you are really looking for is a reverse proxy. With reverse Proxying you can let the server resolve a path (for example /blog) from another server.

+--------+   Request   +--------------------+   Request    +--------------------+
| Client |-----------> | Server domain1.com |------------->| Server domain2.com |
+--------+    /blog    +--------------------+   /blog6     +--------------------+
  • Thanks for the quick reply. I need the client domain URL to be clientdomain.com/blog rather than blog.clientdomain.com. I don't think there's any way to map a subdirectory onto a domain without doing a 301 redirect? – Mark Tansey Sep 26 '12 at 15:52
  • Sure there is. It's called reverse proxy. Let me revise my post. – Christopher Perrin Sep 26 '12 at 15:54
  • Now I have added new info – Christopher Perrin Sep 26 '12 at 16:00
  • why this answer is not accepted, or no-one upvoted? – T.Todua Aug 3 '19 at 13:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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