Setting Up Wildcard DNS for WPMU on cPanel

Allowing people to set up blogs for WordPress MU at blog.domain.tld requires installing your WPMU in the site root and setting up wildcard DNS. In setting up my first WPMU, I ran across this tutorial by Matt Mullenweg of WordPress fame, linked from the WordPress MU docs.

Since I’m not the queen of DNS or anything, I checked with my admin folks to make sure I got the Virtual Host entries correct. I found out this is extremely easy to do if you have a cPanel setup.

Here’s How from my SysAdmin:

To add wildcard DNS and vhost settings in one swoop, simply add a new sub domain to the account and name it ‘*’ (the asterisk character). Make sure it’s document root is pointed to the same directory that your WordPress MU is setup in and cPanel will add everything else to all of the configuration files.

Sure enough, worked like a charm, took 30 seconds, and didn’t require anything scary like restarting Apache–there is no time that runs slower in the time-space continuum than waiting for httpd to restart, man.

Share Button

Testing Your Website on the New Web Host Before Switching Domain Records

From Uncorrupted Hosting Blog: ((Emphasis added.))

You can test everything by editing the hosts file on your PC

Go to: C:WindowsSystem32driversetc and open up the hosts file with a text editor, go to the end of the file and type the IP address of your new server, press tab & type your domain name, save the document, close your web browser, and clean your DNS cache (click start, click run type ipconfig /flushdns & press enter). Next, open your browser and go to your site – everything should work. When you’re done testing, delete the lines you added to your hosts file and then save/close it.

At this point, all that’s left to do is change the DNS servers for your site and point them at the DNS servers provided by your new host.

Using this approach, you can test a database driven site (like WordPress) on a new host before officiallygoing live at the new host. Always allow overlap between your old hosting account and new hosting account to make the move more seamless!

For my Mac friends, find your host files in the /etc folder. To access this file in Finder to to Go > Go To Folder, and type in /etc. ((Thanks to Mac Tips & Tricks for the info.))

When you’re done, delete that entry in your hosts file, and you’ll see what everyone else does when going to that domain.

Share Button