-1

I have a domain registered with eNom. From time to time I will do an nslookup example.com and get the IP address. However, when I put nslookup www.example.com it responds

can't find www.example.com: server failed

After restarting Named, I get this error for example.com, while www.example.com is working as expected.

What could be causing this issue?

I am restarting the main name server in our network; the mentioned domain is hosted on another server.

TRiG
  • 1,181
  • 3
  • 13
  • 30
tawfekov
  • 195
  • 10

2 Answers2

2

declare your www subdomain as a CNAME to your A - example of bind9 configs below:

--- named.conf

*SNIP*
zone "domainname.com" {
     type master;
     file "/etc/bind/domainname.com";
     allow-update { none; };
};

--- /etc/bind/domainname.com

*SNIP*
@       IN      A       xxx.xxx.xxx.xxx
www     IN      CNAME   @

Notes:

  • xxx.xxx.xxx.xxx is your IP address (for the domain)

  • there are some parts missing from configs (in the place of SNIP); added only the interesting bits

Kaplah.

Raven007
  • 574
  • 4
  • 5
1

Have you actually got a www in your zone file? Just having the name (and the root working) isn't enough to make the www sub domain work.

Cian
  • 5,838
  • 1
  • 28
  • 40
  • The question is quite clear (and will be more clear once my edit goes through) that the www subdomain does work ... sometimes. – TRiG Jul 23 '15 at 09:27