Question : Question about CNAME records (aliases)

Hi,

I want to create a site where Users can create their own account logins.  I want the user to be able to pick there own domain prefix (Cname record) .  eg.  my site would be something like  www.mysitename.com but then the user could choose to have userName.mysitename.com.

As I understand it, to do this I would have to create a new CNAME record and a new host header in IIS.  This isn't a problem to do manually but I guess I would have to find a domain name registrar where I could add CNAME records programmatically?

My main question is, am I on the correct train of thought here to solve this problem.  Or is there an alternative way of acheiving the above?

Answer : Question about CNAME records (aliases)

Hi!

You won't need to add CNAME records or host your own DNS server if you just add a wildcard A record:

*.mysitename.com. IN A xxx.xxx.xxx.xx

... where xxx.xxx.xxx.xx is your server's IP address.

Once you've done this all you need to do is add your hostname to your server's virtual host file (not sure how this is done exactly in IIS).

So, basically, once a user signs up (e.g. harry), all you need to do is have harry.mysitename.com added as a virtual host in IIS, the DNS will already be pointing to the correct location.
Random Solutions  
 
programming4us programming4us