If you are on a Windows 7/vista box, you may need to open the command prompt as an administrator.īy the way, to open an application on Windows as an administrator, you right click on the application and select the ‘Run as Administrator’. Not sure its necessary but to flush the windows DNS, you open a command prompt and type… When a web browser is directed to a domain name, the system will check the Hosts file for matching records first, and if nothing is. To get round this, you can simply right click on the file and change the file permissions to allow anyone to edit it (which is what I did) or you can open notepad as an administrator before opening the hosts file. On Windows 7 and probably Vista (never had the pleasure), you will need to be an administrator to save any changes to this file. On a Windows box, you can find the hosts file at the path Īgain you simply enter the IP address and host name you are using and save. Handy Tip: You can make aliases to save you remembering those commands, like so…Īlias hosts='sudo nano /private/etc/hosts' You will then need to enter your IP address and hostname…ġ92.168.0.1 Save the hosts file and flush the DNS. On your Mac OSX (10.2 or later), you can find your host file by typing…
When you are developing in a sandbox environment, you can place host names in this file to direct your browser to the IP address of your sandbox. The hosts file is a plain text file that the operating system uses to link host names to IP addresses. Here is a short one to get me blogging again.