This post discusses What are Hosts Files? , Use of Host Files, Host File Locations, Find IP Address of any Domain, How do I edit host files? , How to block websites using host files and Host File Hacking.
How To Edit The Hosts File?
If you are not very familiar with the topic of advanced computers, the term “Hosts File” may seem strange that you may not even know this term. Every computer has a unique file in the operating system component that plays an important role about how you surf the internet to your computer.
What are Hosts Files?
In very simple terms, Hosts Files are configuration files that store information about computers over a network. Host files consist of information about domain names and IP address mapping, which is the domain name which will match which IP address, and this is where your browser talks to DNS (Domain Name Server) before loading any web page.
Using File Hosts
As I said, when you enter a web address in your browser’s address bar, before opening a web page that actually has communication between your browser and DNS (Domain Name Server) to decide the exact IP address of the page that contains the alternative name domain.
What if we want to provide an IP address manually? Host files can serve this purpose for us. We can write the domain name and IP address of their mapping that we want to find in Hosts File. So before going to DNS, your browser will read from the Host Files first.
Hosts File Locations
If you are using a Windows operating system, the Hosts File can be found in:
C / Windows / System32 / drivers / etc / hosts
If you use OS Linux, the path is:
/ etc / host s
One thing you should note is that the host file it doesn’t have any extensions, so you only need to double-click to open. Windows users can use text editors such as notepad, Wordpad, etc. to view them.
Finding the IP Address of All Domain Names
We will use the command prompt with the ping command to get the IP address. Make sure you are connected to the internet before doing this.
The default command prompt is installed on your computer. Press CTRL + R to open the run utility. Type ” cmd ” in the search box and press ” ENTER “.
The command prompt window will open to the default view. The last line of the display says something like “C: \ Users \ User name>, where user name is the specific username of your computer.
Now write ” ping domain name ” and then Press ” ENTER “. Examples like below: C: \ Users \ xxxxxxx> ping then press ” ENTER ” and you will see your IP address as ” 18.104.22.168 “.
then we will continue to edit the Host File. If you visit the Host File for the first time, you will see the default entry in the Host File, and now it’s time to play with it.
How do you edit the host file?
How to edit hosts files is the question you will be looking for because I have talked about some interesting things about it. But, wait, there are many things that will make you more interested in Host files.
So, you know what the Hosts File is, where it is found, what is the use and how to find the IP address of the domain name using the ping command from the command prompt window. Now we are going to edit the Host File which will change the contents of the Default Host File, and the entries are slightly generic according to our choice.
As I said before the hosts file can be opened with one of the most convenient text editor and notepad utilities to use. This is what your Host File looks like when you open it for the first time:
This is the format for making an entry to the hosts file which is the IP address then the domain name. So if we want to add the IP address, just open the end of the file and write “22.214.171.124”. So next time when you will write url into your browser, the Hosts file will be read, and the browser will be directed to the IP address mentioned according to the Host File.
Believe me, it’s fun when you know how to modify the Host file. You can make your computer access to the internet as you want.
So, you know how to edit the Host File. Isn’t it fun trying to hack a little using Hosts File? It’s better to do tricks like that on someone else’s computer to trick them or make them scratch their heads with what they see.
How do I block sites using Host files on certain computers?
This trick is useful if you are a parent and do not want your children to have access to certain websites. Many offices limit access to certain sites for their employees. In that case, the only thing they do is edit the Host File so that when the browser sees a particular domain name, it will block it. Let’s see how to block websites using Host files on certain Computers.
Go to the Host Host File location according to your operating system configuration and open it in Notepad it is better to modify the Host File. Let’s say you want to block www.facebook.com access, then go to the end of the Hosts File and write ” 127.0.0.1 www.facebook.com .” Then Save and close the Host File.
When you write the www.facebook.com domain name in a browser, the website will not be accessible. The same way you can add multiple domain names to block and if you want to allow access to certain websites, then just delete the domain name from the list and the site will be accessible again. Now I’m sure you know how to block websites using files hosted on your computer.
Hacking Host Files The
Term hacking is used when we intend to change the actual behavior of something and modify it to happen is a number of different ways. You can have a custom host file on your PC to make your computer work as you wish.