Take the 2-minute tour ×

I have a local web server and the following situation:

  • Accessing web server externally via domain name and IP works
  • Accessing web server internally via local IP works
  • Accessing web server internally via external IP works
  • Accessing web server internally via domain name is SLOW

I know I can just edit the HOSTS file on all the machines here but that is not a solution for me. (I could also set up a DNS server, but I've tried and I can't get it to work, it's a pain)

Any idea why this is happening?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

It's timing out trying to resolve. You can either add it to /etc/hosts or specify a DNS server (you could even use Google's public DNS

share|improve this answer
How easy/hard is it to set up a local dns server? –  psp Feb 24 '11 at 19:04
it's not hard... apt-get install bind9 ; and check on how to add local zones to it plenty of tutorials –  Hrvoje Špoljar Feb 24 '11 at 19:39
But why does it time out to resolve? –  psp Feb 24 '11 at 20:23
because the server is going externally to reach an internal host. It can cause problems. It would be suggested to either add the IP address in your hosts file or the router's host file. You could also run an internal DNS server such as bind9, have your DHCP pool hand it out and have the domain name as an internal IP address in your local DNS server. –  David Rickman Feb 25 '11 at 17:17
add comment

Your Answer


