WordPress Multisite Subdomains Without Wildcards

The easiest way to run a Multisite network with subdomains is to use wildcard subdomains, because they’ll automagically map anything.yourdomain.com to yourdomain.com and WordPress will in turn translate that for you.

When you’re on shared hosting, you can’t do that. But don’t worry! If you’re willing to do it manually, every time you have a new subdomain, you can still have subdomains! This is really easy, if weird.

Go to manage domains on your Panel and click on ‘Add New Domain / Sub-Domain’

Add your subdomain as ‘mysub.yourdomain.com’ and check the box to remove www (it’s a subdomain, you don’t need it, and it causes weird issues with some plugins).

Set the Web Directory to where you have your main domain installed (normally this will be /home/username/yourdomain.com ) – yes, I really mean exactly the same. This is what wildcards do for you, but since you don’t have it, you need to do this. It should look like this:

That’s it! Now you just scroll down and press Fully Host This Domain and wait till it’s provisioned. Once that’s done, you can go to mysub.yourdomain.com and it will take you to yourdomain.com! Add in a subdomain within WordPress called ‘mysub’ and everything will work exactly like it should.

About these ads
StudioPress Theme of the Month

Comments

  1. Thanks for this post, it’s given me some hope.

    At present I’m trying to get domain mapping to work with subdirectories on a shared host. I’m thinking about doing a fresh install and trying my hand (again) with subdomains instead.

    However, when I try to create a subdomain in my control panel, it wants me to point the subdomain to a subdirectory and won’t allow me to point to the root directory (root /htdocs).

    Do you think that if I created a subdirectory to point the subdomain to, I could use .htaccess to redirect to the root, and would this work with domain mapping?

    Alternatively, how about if I installed wordpress into a subdirectory, pointed my subdomains to that subdirectory, and used .htaccess to redirect to the subdirectory?

    I’m coming from a Windows/.Net background so haven’t used .htaccess before.

    Thanks again

    • An .htaccess redirect doesn’t work in this case.

      If your host doesn’t let you change subdomain locations (shame!), then yes, you can use Subdirectories. BUT! You don’t have to do anything fancy! Just map the domain via WP to that subdirectory :) It works.

    • Thank you! This helped a lot.

  2. Awesome! Thanks!

Trackbacks

Half-Elf? Try Half OFF WordPress ebooks!