0

Is there a way to match domain.com without using an "@" entry? It seems "*" entries only match *.domain.com

2 Answers 2

2

What is your ultimate goal in eliminating the use of "@"? The @ isn't actually part of DNS; it's just a placeholder in your DNS zone file syntax that means "no hostname here".

Instead of writing (BIND zone file syntax):

    @             IN    A    1.2.3.4

you can use a fully qualified name on the left:

    example.com.  IN    A    1.2.3.4

Note that the trailing period after com. is critical in this example, since BIND assumes that names written without a trailing period get the current zone name appended to them (so you'd end up with an A record for example.com.example.com., probably not what you want).

-3

I tend to just CNAME domain.com to www.domain.com.

2
  • 4
    I would strongly recommend against doing that. Records with a CNAME cannot have any other records (including NS and SOA), so it is logically invalid to add a CNAME to domain.com. You may find that it works sometimes, but there are resolvers out there that will fail when they encounter this situation. For references, see RFC 1034 section 3.6.2 and RFC 1912 section 2.4. Nov 25, 2009 at 18:27
  • yeah, don't do that. :) Nov 26, 2009 at 1:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .