Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a domain, with a number of CNAME records to

Now, what I would like to achieve is that if any other subdomain is queried or the domain itself is queried, I would like to have returned such that if or are queried, is returned by default.

I am not sure how this is possible if it is? Any help is appreciated.


share|improve this question

1 Answer 1

for just add


But you can't CNAME as it's root of your zone. See here:

But you can create A record for, and have * CNAME In this case everything that ends with would resolve to same ip.

share|improve this answer
Although, I'd recommend setting up the A record instead of the CNAME. e.g. * IN A It reduces the number of lookups made to the DNS server. –  frogstarr78 Oct 22 '11 at 16:05
I am aware of that but I guess there's no other option since I am using a multi-site on a single IP setup using Apache VirtualHosts. –  John Oct 22 '11 at 16:52
@John But what has a CNAME to do with Apache's VirtualHosts? Or better: Who told you that they only work with CNAMEs? –  mailq Oct 22 '11 at 17:08
Can't get this done on godaddy... There's a limit of number of records in my zone file. But a wildcard record should count just as one no? –  John Oct 22 '11 at 17:13
A CNAME and an A record will work exactly the same with respect to virtual hosts. The client will still follow the DNS to decide what address to connect to and will still set the host header to the original host it was looking for. –  David Schwartz Oct 22 '11 at 18:45

Your Answer


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.