-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"
Ivan Mir
  • 131
  • 7
  • 2
    Try [DNSStuff](http://www.dnsstuff.com/tools#dnsReport|type=domain&&value=site.com) 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
  • [Administration panels are off topic](http://serverfault.com/help/on-topic). [Even the presence of an administration panel on a system,](http://meta.serverfault.com/q/6538/118258) because they [take over the systems in strange and non-standard ways, making it difficult or even impossible for actual system administrators to manage the servers normally](http://meta.serverfault.com/a/3924/118258), and tend to indicate low-quality questions from *users* with insufficient knowledge for this site. – HopelessN00b Mar 20 '15 at 14:14

2 Answers2

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
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.

Ivan Mir
  • 131
  • 7