Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Can't connect to website when I'm local on the netwrok

Posted on 2005-04-03
Medium Priority
Last Modified: 2010-04-10
Hi Guys, When my laptop is connected locally on the network I can't view our website nor check my email using outlook. I modified the Host file to point to our exchange and web server, things went well ... but guess what now when I'n on the road I can't view the websit or check the email cause it is looking for an internal IP!!! is there a way that I can fix this thing without changing the HOST file back an forth ? maybe a change on DNS or something ....

Question by:sillc
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 96

Expert Comment

by:Lee W, MVP
ID: 13694403
The host file overrides DNS.
LVL 96

Expert Comment

by:Lee W, MVP
ID: 13694412
If you use DHCP at the office with DHCP assigning your DNS, then you should be fine.  On the road, your ISP assigns DNS.  If you have to, run TWO DNS servers at work, one for internal, one for external.

Author Comment

ID: 13694625
I do use DHCP and the DNS IP that it gives is an internal one and it works well with all websites. Only ours it doesn't reognize it without editing the HOST file
Simplify Your Workload with One Tool

How do you combat today’s intelligent hacker while managing multiple domains and platforms? By simplifying your workload with one tool. With Lunarpages hosting through Plesk Onyx, you can:

Automate SSL generation and installation with two clicks
Experience total server control


Expert Comment

ID: 13694698
You need to update the DNS records on your DNS server. Add a HOST record for your Exchange server, and a HOST record for your web server.

Remove your entries in the PC hosts file.

Once you've done that, restart your computer then try ping the server (exchange and web) by name. If it does not resolve it, make sure your DNS server setting (from DHCP) is setup correctly pointed to the DNS server you add records to.

If you can provide more details (e.g. server name and IP address for Exchange, Web, DNS, DHCP scope, etc) it will make it easier for us to give you a more descriptive suggestion.

Good Luck.

LVL 10

Accepted Solution

plemieux72 earned 2000 total points
ID: 13695595
You need an internal DNS server (or more) to resolve internal hosts.  Your DHCP server must assign this DNS server(s) to all internal clients.  

Then, you need an external DNS server (most often not hosted by you, but by an ISP) to resolve your external hosts.

The above is called split-DNS or split-brain DNS.  In a computer's TCP/IP settings, the internal DNS servers cannot be mixed with external DNS servers and vice-versa.  When connected to the internal LAN, your queries for external hosts will be resolved by the internal DNS server.  If it does not have the host records needed in its zone, it will query the root DNS servers top down to get what it needs.  A more optimal setup to accomplish this however would be to use a couple of external forwarders in your internal DNS server config and slave (disable recursion) your internal DNS server(s) to those forwarders.  The forwarders could be your ISP's DNS servers.  This is better for security purposes as only these two servers will ever communicate with your internal server.  Note- You will need to increase the timeout in the Forwarders tab to 60 for this to work.

Here is an excellent article by Mark Minasi on what you need to get split-brain DNS setup prior to installing AD which also applies for Exchange and web servers:

Steps To Assembling The Perfect Split-Brain DNS System For Your Active Directory

Expert Comment

ID: 13697443

to solve the cant see the website from the local network you need to add a host record for "www" (without the quotes) to your DNS server with the IP address of your webserver.

As for can't read e-mail in outlook thats a little different, are you connecting to a server called somethign like ?
if do you need to add another host entry in your DNS, this time it'd be "mail" and the IP address of the mail server internally.

this should sort the problem,


Expert Comment

ID: 13699491
You shouldn't have to change anything in your personal network settings or your hosts file - unless you plan to run your own DNS server on that system. DHCP is supposed to handle all off that for you and if it's not either your system's network settings are wrong or the DHCP server needs to be reconfigured.

To figure out which: If you're the only one on the LAN who can't connect to these services, take a look at someone else's network settings and make sure yours match. If nobody on your LAN can connect properly, the DHCP server needs to be reconfigured.

The reason you can't connect to these services when you're on the road is because with the hosts file entries, the system is looking for those services at internal ip addresses (which don't route through the internet for obvious reasons). If these services are internet accessible, any nameserver should be able to find them (rather, find the authoritative nameserver for them) - including your ISP's nameserver, which is why you had no problems in this regard until you edited your hosts file.

To (extremely) simplify things - click Start -> Control Panel -> Network Settings, double-click your "Local Area Connection" (don't touch the dial up connection if you have that), click "Internet Protocol (TCP/IP)" then "Properties" and make sure "Obtain IP address automatically" and "Obtain DNS server address automatically" are checked. Click OK to get out of that.

Open your hosts file and make sure the only entry is:       localhost


Expert Comment

ID: 13699526
Forgot to mention: After you update your network settings (and you've OK'd out of the configuration screens), right-click the device in the "Network Connections" window and click "Disable". Wait a few seconds, then double click the device to reactivate it.

You may also want to:
Start > Run > cmd
ipconfig /flushdns

after doing this to clear any addresses loaded into your cache

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For many of us, the  holiday season kindles the natural urge to give back to our friends, family members and communities. While it's easy for friends to notice the impact of such deeds, understanding the contributions of businesses and enterprises i…
This month, Experts Exchange’s free Course of the Month is focused on CompTIA IT Fundamentals.
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question