Proper DNS records for handling subdomains and missing subdomains

Posted by Cerin on Server Fault See other posts from Server Fault or by Cerin
Published on 2012-05-31T21:27:24Z Indexed on 2012/05/31 22:43 UTC
Read the original article Hit count: 283

Filed under:
|

I'm trying to craft DNS records to support:

  1. Explicitly defined subdomains, e.g. ftp.mydomain.com
  2. A missing subdomain that redirects to www.
  3. 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?

© Server Fault or respective owner

Related posts about dns

Related posts about nameserver