Jan
1
2010

Test DNS Transfer with Windows Hosts File

By Gabriel Harper Posted in

When launching a new website and making a DNS change, it’s not enough to simply hope everything was done correctly. Here’s a simple trick you can use to test DNS changes on a Windows PC before they ever hit your nameserver.

You can fake or override DNS lookups by manually entering an IP address for any domain name you want. Use it to see if yoursite.com looks OK on the new server or IP address before DNS makes it around to you.

If you’re on a Windows machine, you can try this by adding an entry to the `hosts` file (C:\WINDOWS\system32\drivers\etc\hosts by default) on it’s own line:

1
1.2.3.4     www.yoursite.com

That’s it – now reload your browser and visit www.yoursite.com. It will ignore DNS and resolve as 1.2.3.4 (or whatever you typed in).

Have a happy new year everyone!

About The Author

Gabriel Harper

Gabe is the owner and founder of Intavant, and contributes to Intavant Blog regularly with his expertise in design, development & business.

Did you find this article helpful? Please subscribe!