-1

I have an Ubuntu+Virtualmin server with multiple sites on board. Sites are working fine but for some reason "www." and other subdomains are not resolving.

My server IP is 107.170.xxx.xx. If I add this record to my /etc/hosts on local machine, I can access www.site.com, so Apache2 is working correctly:

107.170.xxx.xx www.site.com 

nslookup:

> site.com
Server:     200.30.xxx.xx
Address:    200.30.xxx.xx#53
Non-authoritative answer:
Name:   site.com
Address: 107.170.xxx.xx

> www.site.com
Server:     200.30.xxx.xx
Address:    200.30.xxx.xx#53

** server can't find www.site.com: NXDOMAIN

BIND9 record similar for all sites (I tried CNAME but no luck):

$ttl 38400
@   IN  SOA host-domain.com. root.host-domain.com. (
            140xxx7595
            10800
            3600
            604800
            38400 )
@   IN  NS  host-domain.com.
site.com.   IN  A   107.170.xxx.xx
www.site.com.   IN  A   107.170.xxx.xx
ftp.site.com.   IN  A   107.170.xxx.xx
m.site.com. IN  A   107.170.xxx.xx
localhost.site.com. IN  A   127.0.0.1
webmail.site.com.   IN  A   107.170.xxx.xx
admin.site.com. IN  A   107.170.xxx.xx
mail.site.com.  IN  A   107.170.xxx.xx
site.com.   IN  MX  5 mail.site.com.
site.com.   IN  TXT "v=spf1 a mx a:site.com ip4:107.170.xxx.xx ?all"

closed as off-topic by HopelessN00b Mar 20 '15 at 14:14

  • This question does not appear to be about server, networking, or related infrastructure administration within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    Try DNSStuff some public server take time to show changes see if this link show any problems – stackoverflow Jan 16 '15 at 19:23
  • 1
    Why are all the important bits obscured? – Michael Hampton Jan 16 '15 at 20:30
  • @MichaelHampton I thought it could be solved by looking in the configs. Still would like to keep it private, sorry. – Ivan Mir Jan 16 '15 at 23:33
  • @NA7KR Thank you, for my "www." domain it says: "No nameservers provided an SOA record for the zone. You should configure your nameservers to have a master slave relationship. The update of the zone information to the slave nameservers should be handled through the SOA record." – Ivan Mir Jan 16 '15 at 23:36
  • Why is your SOA different of your domain? – Eduardo Ramos Jan 16 '15 at 23:46
0

You'll have to trace the DNS query one at a time to see where it bombs out. On your PC, try this:

 nslookup
 > set type=ns
 > site.com

That should return a list of name servers. Pick one by going:

 > server ip_address_of_one_of_the_NS_servers_returned_above

Then that server should have the www record in it. Confirm this by running:

 > set type=a
 > www.site.com
  • For some reason I'm getting my provider's IP instead of the server's one. – Ivan Mir Jan 22 '15 at 1:43
0

Well, the problem was very simple. My sites are hosted at Digital Ocean and I had only non-www domains in their DNS records.

I still don't know how to dynamically add all subdomains (asterisk is not supported) but that's another story.

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