Proper DNS records for handling subdomains and missing subdomains
- by Cerin
I'm trying to craft DNS records to support:
Explicitly defined subdomains, e.g. ftp.mydomain.com
A missing subdomain that redirects to www.
Implicitly defined subdomains, e.g. <some user entered value>.mydomain.com
For 1, I'm using CNAME records. All seems to be working well.
For 2, I'm using an A record, @ -> 123.456.789.012. Worked well.
For 3, I ran into some trouble. I tried adding another A record, * -> 123.456.789.012. This appeared to work initially, but it broke #2. i.e. now browsing to mydomain.com doesn't redirect to www.mydomain.com.
I tried adding the CNAME record @ -> 123.456.789.012, but my DNS admin tool won't accept it because it's saying the @ is already in use, even though I deleted the A record using it.
Am I configuring this incorrectly? What am I doing wrong?