Select a Category

How to Change Host File


If you want to test your website without modify your domain name server (DNS), you can change your host file in your computer. When computer is connecting to a website, it first checks its local host file. If the website is in its host file, it does not ask a public domain name server to translate a name into IP address.


Host file is in the format of IP address – host name. You can edit it with any text editor such as notepad in Windows or Nano in Linux.

Example:       localhost

Ubuntu and most linux system put the host file is in /etc/hosts;

Windows XP’s host file is in C:\WINDOWS\system32\drivers\etc\hosts

With the sample above, you can your name-based virtual hosts with: and


Comments are closed.