GoDaddy VPS Wildcard Subdomain Configuration

I have a new VPS hosted at GoDaddy and was looking to set up a domain where the PHP script would take the subdomain as the account for my clients (ie. http://client.domain.com). I first set up the DNS entry to reflect a wildcard:

A-Record *.domain.com -> (ip address)

I thought that would be enough, but I had to also make a change in the .conf file associated with the domain. Here is are the steps:

1 - Use PUTTY to log in to the server
2 - Switch to root access:
> su root
3 - Edit the turbopanel.conf file using the VI editor) (see instructions for VI):
> vi /etc/httpd/conf.d/turbopanel.conf
4 - Look in the file for the line “ServerAlias www.domain.com” and change it to “ServerAlias *.domain.com” (press i to enter insert mode, and press ESC when done)
5 - Save the file (press ZZ to save and exit the VI Editor)
6 - Open the control panel and restart the HTTP Web Server Service

That’s it… :slight_smile:

Note: you may have to edit it again if you make any changes to the DNS settings.

Hope this helps!

Hi,
I am using godaddy as DOmain provider and also DNS .
My site is on IIS 7 and written in >net 4.0.
Can I use the above solution ? I add the A record as * for my domain .

Next steps is what i need help on ?

Bally

First, I guess neither of you have seen all the threads here (and elsewhere) which recommend against hosting with a registrar! It’s better to learn from the mistakes others share but, if you insist, go for it!

Thanks, BZ,

The instructions for a wildcard subdomain should be helpful for others at GoDaddy but many host will not allow this (on a dedicated server, they should not have a valid complaint).

xB,

Although this is an APACHE board, the above should work for an IIS as it has nothing to do with IIS or net4 but with the DNS (domain name server, another daemon on the server). All the steps should be the same - but GoDaddy’s support is the best place to get your answer as they can tweak their servers to (dis)allow just about anything.

Regards,

DK