Forum Moderators: open
Basically open this in notepad and add the following line to it:
12.34.567.890 www.********.com *********.com
Save the file, and close all your browsers, then open up the ms dos
command prompt which is usually found at,
Start, All Programs, Accessories, then Command Prompt,
Open this and type the following:
ipconfig /flushdns
then type
ping **********.com
These instructions work fine at my workplace but I need to work from home to push the site along but no matter what I do it will not show the new site in my browser, I have tried closing all firewalls but it is not working, can anyone help?
Many Thanks
John
[edited by: encyclo at 6:51 pm (utc) on May 31, 2006]
[edit reason] obfuscated IP address [/edit]
Typically, on a windows machine, that file can be found with this path:
c:\windows\system32\drivers\etc\hosts
The file does not have any extension. After you save it with notepad, make sure that a ".txt" extension has not been added to your file.
Possible causes:
- domain is not correctly entered in the hosts file
- IP address is incorrect
- hosts file is not where your OS is looking for it
- firewall is blocking your traffic
--- firewall on your computer
--- firewall on your router/modem
--- firewall at your ISP
--- firewall at your host (only allowing traffic from your work IP)
To verify that the entry is in your hosts file AND being utilized by your TCP/IP, try pinging the IP address with the -a switch:
ping -a 12.34.567.890
(enter the correct IP of course)
The PING program will first do a reverse lookup on the IP address. It should echo back the first entry from your hosts file with something like this:
Pinging www.example.com [12.34.567.890] with 32 bytes of data:If you don't see that, then your OS is not reading the same "hosts" file that you are editing.
Another option for you to consider is to have your host create a regular DNS entry. Something like "staging.example.com" or "demo.example.com".
btw - when you say it doesn't work, to you mean that it shows the regular website? Or do you mean it gives you some kind of "DNS or server not found error?"
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\Owner>ipconfig /flushdns
Windows IP Configuration
Successfully flushed the DNS Resolver Cache.
C:\Documents and Settings\Owner>ping nicesite.com
Pinging www.nicesite.com [70.87.117.101] with 32 bytes of data:
Reply from 70.87.117.101: bytes=32 time=174ms TTL=43
Reply from 70.87.117.101: bytes=32 time=165ms TTL=43
Reply from 70.87.117.101: bytes=32 time=162ms TTL=43
Reply from 70.87.117.101: bytes=32 time=162ms TTL=43
Ping statistics for 70.87.117.101:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 162ms, Maximum = 174ms, Average = 165ms
C:\Documents and Settings\Owner>^V