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.

Here is my named.conf:

view    "external"
{

        match-clients           { any; };
        match-destinations      { any; };

        recursion no;

        allow-query-cache { none; };

        include "/etc/named.root.hints";

        zone "domain.com" IN {
                type master;
                file "domain.com";
        };
};

and my domain.com

$TTL 86400
@               IN      SOA     ns1.domain.com.      admin.domain.com. (
                        2010111501
                        28800
                        7200
                        864000
                        86400
                        )
                IN      NS      ns1.domain.com.
                IN      NS      ns2.domain.com.

@                       A       109.228.16.159

$ORIGIN domain.com.

@               IN      A       109.228.16.159
domain.com.  IN      A       109.228.16.159
catch           IN      A       109.228.16.159
mail            IN      A       109.228.16.159

domain.com.  IN      MX      10 mail.domain.com.

ns1             IN      CNAME   catch
ns2             IN      CNAME   catch
www             IN      CNAME   catch
*               IN      CNAME   catch

www.domain.com works fine ashfajkshfjkashfjkahskfjhasjkhfajksf.domain.com works fine domain.com doesn't work

any ideas?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Move $ORIGIN to the top of your file. Remove the second A definition for @ and the A definition for domain.com. You may want to replace the @ definition with IN as follows.

$ORIGIN domain.com.
$TTL 86400
@               IN      SOA     ns1.domain.com.      admin.domain.com. (
                        2010111502
                        28800
                        7200
                        864000
                        86400
                        )
                IN      NS      ns1.domain.com.
                IN      NS      ns2.domain.com.
                IN      A       109.228.16.159

catch           IN      A       109.228.16.159
mail            IN      A       109.228.16.159
... 

Check your logs for messages from bind when you restart it.

share|improve this answer
    
Thanks so much! –  James Lockhart Nov 15 '10 at 23:12
1  
Did this actually work? @ should be automatically defined to be the zone being loaded, so the $ORIGIN line should have no effect as it simply sets it again. –  Michael Graff Nov 16 '10 at 10:06
    
@michael I believe the $ORIGIN is redundant, but it doesn't hurt. Likely breaks things severely if it doesn't match the domain it is configuring. That may be a good thing. –  BillThor Nov 16 '10 at 20:49

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.