Why do I need to modify my Host file and how to do it?

You might be asking why make changes to your host file?

Sometimes you might want to make changes to your hosting and your DNS is not propagated. Or perhaps you might just wanna trick out your friends making people think you own the domain name itself.


FOR WINDOWS: 
Kindly open this file with notepad C:\Windows\System32\drivers\etc\hosts .
If you do not know how to do so, kindly press WINDOWS + R and type "C:\Windows\System32\drivers\etc\hosts" without the quotes. When you press "Enter", it will ask you for a program to open the file with. Choose "Notepad".


FOR LINUX
In your terminal (Open from your applications tab):
Type "sudo pico /etc/hosts"
Type in your password.
Now you can edit your hosts file.
If you would like a better interface use this command instead "sudo gedit /etc/hosts".


EDITING THE "Hosts" file:
At the bottom (Windows), or top (Linux) you will be able to see a line like this:

127.0.0.1       localhost

To add a domain name and IP address, just add the IP and press tab followed by the domain name/address in the next line.


For example:
64.233.181.104       google.com
or
64.233.181.104       google

  • 0 Users Found This Useful
Was this answer helpful?