Wildcard DNS and subdomains
Let'say that i've got the domain mydomain.com.
I want that when any visitor goes to
www.mydomain.com
xyz.mydomain.com
abc.mydomain.com
asd.mydomain.com
qwe.mydomain.com
etc...
the visitor will continue seeing "xyz.mydomain.com", but the real address will be "mydomain.com". my asp.net application will handle the differences between the addresses. I want that the subdomain can be anything.
The problem is: I'm using a shared host. They allow me to create subdomains and allow me too create some DNS records:
Address (A)
CNAME
Mail (MX)
IPV6 (AAAA)
TXT
There is possible setup my hosting to accept that asterisk/wildcards for subdomains? How I do?
Solution 1:
Try creating an A or CNAME record with * as the subdomain and your server's IP (A record) or domain (CNAME record) as the destination. If your host's control panel doesn't permit a wildcard, you'll have to contact them for help, or move your DNS to a third party.
Solution 2:
Some advice against wildcard web sites:
What will you do when someone starts publicizing your website as "http://this.company.sucks.domain.com" and it resolves / renders correctly?
Solution 3:
A Bind DNS server allows you to create wildcard A records like this:
*.mydomain.com. IN A x.x.x.x
Or, if they are using a web control panel, create an A record for the host * , at your IP address.
Windows 2000 DNS server takes some effort to use wildcarding:
Step 1. Enable LooseWildcarding. Loose Wildcarding http://technet.microsoft.com/en-us/library/cc940790.aspx
Step 2. Use Dnscmd to create the Wildcard record. http://support.microsoft.com/default.aspx?scid=kb;en-us;840687
I'm not sure about Server 2003 and newer - there was an issue with wildcards in Server 2003 DNS not working if you have WINS forward lookup enabled