So in the Inspired Noob series we’ve been talking a lot about DNS. With that said there was a trick I learned a few years ago (I think it was thanks to my hosting company support). This trick does a number of things:
- Saves countless hours on development
- Removes client intervention/help from the development process
- Allows you to secretly work on ANY website, view the results live and in real time, while the rest of the world is none-the-wiser
[infobox margin_bottom="0" margin_top="0" border_radius="all" color="white" title=""] iNoobs is a series of articles for those new to web design and web development, created by Zach Katkin, founder of Promana.net, a brilliant resource for small business software news. [/infobox]
So what is this DNS panacea? What simple trick can solve all these problems?
Adjusting Your Local DNS File
For a quick refresher on how DNS works you can review our post on How Does DNS Work? But one thing I purposely left out was that – as a last resort – your computer’s OS stores a DNS file that it uses to resolve (match) domain names to IP addresses. Because it’s local and manually updated, changing or adjusting this file means you can FORCE your computer to look at ANOTHER IP ADDRESS for ANY DOMAIN.
Example in Action
Lets say you’re working on your client’s site at HorseMagnet.com – they want a completely new design AND they want you to host it. But, they’re hosted somewhere else currently. You don’t yet have the information (or the time/desire) to transfer their hosting over. You want to just setup their site on your server and type in HorseMagnet.com and begin working and finalize your design.
By modifying your local host file, this is possible – and easy. You’ll be forcing (in a total violent sexual way) your browser/computer to view your own hosting when typing in HorseMagnet.com.
How to Modify Your Local Host/DNS File
- Open Up Notepad – If you’re on a fancy version of Windows – Vista/7 - you may need to run notepad as an administrator. You can do this by right clicking Notepad’s icon and selecting “run as administrator.”
- Open up the host file in windows – C:\Windows\System32\drivers\etc\hosts
- Edit the file based on what changes you want to enforce. Start with the IP address of the area you’re forcing your browser/computer to look at (probably the IP Address of your server) then *tab* and the domain name you’ll be forcing. Now it’s important to remember that you’ll need to include BOTH www. and non-www versions as each is considered a different location.
- Save the file
- Now there’s two things you can do – either restart your computer – or if you don’t want to waste time…
- Close your browser
- Open up command prompt (CMD in “run”/”search” box)
- type “ipconfig /flushdns” (without quotes)
- Relaunch browser and visit your website
- You’ll now see your server instead of the live site

Zach Katkin
Latest posts by Zach Katkin (see all)
- How to Write AdWords Ads – March 20, 2013
- 5 Extremely Useful WordPress Plugins – March 13, 2013
- Basecamp 2013 Review: Project Management Tools for Small Businesses – March 1, 2013
- Apollo 2013 Review: Project Management Tools for Small Businesses – February 15, 2013
- How a Few Simple Tools & Techniques Can Help You Write Better and Grow Traffic – January 30, 2013









Yeah, this is a great trick, it saves a lot of time! You could also use a program like Detours! DetoursApp.com
Thanks Cody,
Awesome tool – I had been looking for something like this for mac and there you go!
I use .dev instead of .com. (=
Yuri, do you register another domain, or simply setup .dev on the host and configure your host/dns to point to that?
This is something I have been doing for a while now. I used to use Hosts Toggle but now if I’m working on something like a new WordPress site while the client’s existing website is still live, I use the Hosts file to switch just the (www) and leave the (non-www) URL alone so I can easily have access to both. Very useful because you don’t have to go round trying to change all references to an IP address or temporary domain in the WordPress database and/or files when you are ready to launch the new site.