Most operating systems, including Microsoft Windows versions, use the hosts file to translate computer names. Also known as “host names” to numerical IP addresses, the hosts file is similar to using a phone book to find the matching phone number of a specific person’s name.
While Domain Name System – or DNS – is mostly used for this function (being a centralized and half-automatically managed name resolution system), the HOSTS file can be used as a local name resolution mechanism, and when used in conjunction with other name resolution mechanisms such as DNS, the HOSTS file takes precedence over them.
Insedently this is also the file that a hacker would update to forse your browser to redirect a legit website to a phishing website.
Location of the Hosts FileIn Microsoft operating systems, the Hosts file is located in the following location
- c:\Windows\System32\Drivers\etc
The HOSTS file is a text file, one that does not have a file extension. It contains lines of text that are made of IP addresses followed by one or more host names or fully qualified domain names (FQDNs).
Open the file with Notepad and enter the IP address of your website as given to you in your welcome email followed by a space and the full domain of your website.
As an example exelwebs.com can be reditected with this entry:
204.197.248.147 exelwebs.com
Save your file and open the website in your browser. Your browser will ignore the DNS settings of your domain and uses the hosts entry instead.
- Only you will be able to see the website.
- Remember to delete the entry from your hosts file once your domain has propagated fully.
You can also precede the entry for a # to stop your browser from using it. - Remember to clear your browser cache to ensure you are looking at the live website.