I created zone file

zone "example.com" {
    type master;
    file "/etc/bind/db.example.com";


$TTL    604800
@ IN SOA pgdebian.example.com. contact.example.com.
(20881122 604800 86400 2419200 604800 )

                NS      pgdebian.xxx.com.
pgdebian        A        
pgdebian        HINFO   "PII 233 :-)" "Debian Testing"
*               A

Now, when I request http://lol.example.com, BIND9 answers But if I try nslookup example.com, nslookup says SERVER FAILED.

How can I redirect example.com to


The wildcard is matching children of example.com but not example.com proper.

Add this record:

@ A

to add as an address for example.com itself.

The Wikipedia article on wildcard DNS is pretty good.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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