-   Linux - Server (
-   -   Cannot get to website using domain name (

cryingthug 05-28-2012 03:17 PM

Cannot get to website using domain name
I cannot see to get to my site by domain name. I can get to it by IP address fine. I am guessing that the problem is with the Bind configuration file... or maybe Apache?

This works:

$ dig @dnsserver
Which means that DNS is working.
When I type in the browser the IP this works:
But this does not work:
Here is the file.

; BIND data file for mytestsite.   
$TTL        604800     
;Name of the primary ns and the email of the administrator.
@          IN  SOA (
            2012052806 ;Serial                                                     
            604800      ; Refresh
            86400      ; Retry
            2419200    ; Expire
            604800 )    ; Negative Cache TTL
;Tells dns servers on the Internet the primary ns server that have authorit    y
            IN  NS

;Anchor records that point to your domain.
;The address can only be accessed by the server itself.
localhost  IN  A

;The domain name. The number should be the Public IP address.
;This is the address they ping or browse to IN  A

;Pinging would return the public IP address.
ns          IN  A

;Browsing would take the viewer to the site.
www        IN  A

;Makes the same as
forum      IN  CNAME  www

cryingthug 05-28-2012 03:19 PM

Oh, btw, I am using Debian 6 and Apache2 Bind9.

nibraz 05-28-2012 04:47 PM

I had the same issue.. make sure your router is port forwarding 80 and 53. Here is how my zone file looks, and it works perfectly.


$TTL        3600
@      IN      SOA (
                        2012041603      ; serial, todays date + todays serial #
                        7200              ; refresh, seconds
                        540              ; retry, seconds
                        604800              ; expire, seconds
                        86400 )            ; minimum, seconds

mail          3600      A               3600      A                 3600      MX    10       3600      NS             3600      NS            
www                3600      A                 IN A IN A

cryingthug 01-14-2013 07:20 AM

Forwarding the port worked. However I am getting the domain name of the router appended to the nslookup query.

domain name =
router's domain name =

Look at the output under Non-authoritative answer.


C:\Documents and Settings\johnny>nslookup
*** Can't find server name for address 192.168.X.X: Non-existent domain
*** Default servers are not available
Server:  UnKnown
Address:  192.168.X.X

Non-authoritative answer:

cryingthug 01-23-2013 09:23 PM


Why did you write 3600 in the second column? I have never seen that before.


mail          3600      A               3600      A                 3600      MX    10       3600      NS             3600      NS            
www                3600      A                

m1rr0rm3 01-24-2013 10:40 PM


Are you using Cpanel or PLESK?

;Browsing would take the viewer to the site.
www IN A

The answer is actually pretty simple. If you change, in your dns.conf file the POINTER from
www IN A

to IN A

It should work 01-24-2013 11:42 PM

Hello, Please check with this.
Hi ,

First of all , You can check your website is working from local environment.

you can check through /etc/hosts entry....

IP domainname


All times are GMT -5. The time now is 02:20 AM.