Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question

migrated from stackoverflow.com Nov 25 '09 at 18:20

This question came from our site for professional and enthusiast programmers.

add comment

2 Answers

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).

share|improve this answer
add comment

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

share|improve this answer
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. –  Greg Hewgill Nov 25 '09 at 18:27
    
yeah, don't do that. :) –  toppledwagon Nov 26 '09 at 1:21
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.