cancel
Showing results for 
Search instead for 
Did you mean: 

How to cheat and bypass DNS propagation!

Adam1V
Grafter
Posts: 223
Registered: ‎31-07-2007

How to cheat and bypass DNS propagation!

This may or may not already be known to some people, but after making changes to my domain I must now wait for propagation which can take up to 48 hours (worst case senario). The simple solution below will bypass ISP propagation and allow you to work on your own domain right away:
Browse to your windows HOST file located in %windir%\system32\drivers\etc
Edit this with notepad and add the following lines:
<Hosts IP Address> www.website.co.uk
<Hosts IP Address> website.co.uk
(do this without the <>)
As I have a number of domains hosted with plesk I could ping each one to ensure I have the correct IP, so my HOST file looks like:
212.56.83.200 www.mydomain.co.uk
212.56.83.200 mydomain.co.uk

and voila, it works straight away.
4 REPLIES 4
Lurker
Grafter
Posts: 1,867
Registered: ‎23-10-2008

Re: How to cheat and bypass DNS propagation!

If you are only doing this for testing, why not simply type the IP address into your browser, rather than edit your hosts file, which you will have to go back and edit later to allow you to test the DNS propagation has worked?
Adam1V
Grafter
Posts: 223
Registered: ‎31-07-2007

Re: How to cheat and bypass DNS propagation!

im not sure you can? since the IP Address doesnt appear to resolve the website address?
Peter_Vaughan
Community Veteran
Posts: 14,469
Registered: ‎30-07-2007

Re: How to cheat and bypass DNS propagation!

The IP hosts 100s of websites - it's a web server, so the browser still has to send the domain name in the URL to the IP address it has found in the hosts file for the web server to resolve which of it's hosted websites you are asking for.
Just putting in the IP address will resolve to the default website on the server which will probably not show anything.
zubel
Community Veteran
Posts: 3,789
Thanks: 1
Registered: ‎08-06-2007

Re: How to cheat and bypass DNS propagation!

Peter has pretty much hit the nail on the head.
If the server is hosting multiple virtual hosts, then the server needs to be aware of which host it should be serving.
When your browser requests a web page, it will send a request along the lines of:

GET / HTTP/1.1
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE
    5.01; Windows NT)
Host: www.yourwebsite.com
Connection: Keep-Alive

The important part is the host header.  if you access just by IP address then the host header will generally not exist, or just show the IP.
B.