How to edit or hack your local hosts file

As a designer, developer or even a store owner – you may want to be able to look at a website that the DNS currently does not point to. This is often done during development or the design processes. Here’s how you accomplish this.

Hosts file instructions:

Make sure you shut down your browser before doing anything to the hosts file, or the browser may not pick up the changes you have made.

your hosts file is located here:


There is no file extension for your hosts file, you will need to open it in notepad or another text editing program.

After the preamble on the page, you will find at least one entry: localhost

below this, type the line in this format



…then save and close the hosts file (note – you do not need brackets.

…now open your browser and go to that url/domain, you should be able to see the site, log in as you normally would to see your mail, website, development area – whatever.

This is what “hacking your localhost file” means.

Contact us today!

  • This field is for validation purposes and should be left unchanged.