Home How to how to edit hosts file windows 7? - get complete details

how to edit hosts file windows 7? – get complete details

The hosts file is a part of the operating system on your computer that maps hostnames into IP addresses. This file is like a telephone book for your computer. It converts human-friendly hostnames to IP addresses your machine can understand. It may be necessary to edit this file for testing, troubleshooting or blocking websites. Here’s the guide to editing the hosts file on Windows 7.

What exactly is the host file?

Overview

The hosts file is a text file in ASCII format that matches IP addresses with hostnames. Your computer will default to refer to the hosts before contacting the DNS servers on the internet. You can override DNS on your local computer by using the hosts file.

Find the hosts file in Windows 7

Path To Hosts File

In Windows 7, the hosts file is located at C:\Windows\System32\drivers\etc\hosts. The file is hidden, and you need administrative rights to view and edit it.

Editing the hosts file

Be sure to create a copy of your hosts file before you make any changes.

Open Notepad as Administrator

You will need to use a text editor that has administrative rights in order to edit the hosts file. Search for Notepad, click on it and choose ‘Run As Administrator’.

Open the hosts file in

In the Notepad, go to File > Open, and navigate to the location of the hosts file (C:\Windows\System32\drivers\etc\). Type hosts in the filename and click Open.

Edit the hosts file

You will find a host file that contains comments (lines beginning with ‘#’), followed by IP addresses and hosts). You can block a particular website by adding a line to the end of your hosts file. Enter 127.0.0.1 followed by the URL.

Save your changes

To save your changes, click File > Save. If you have trouble saving, ensure that you are running Notepad with administrator rights.

Validating changes and troubleshooting

Clear the DNS Cache

You should flush the DNS cache after editing your hosts file to ensure that your changes are immediately applied. Enter ipconfig and press Enter.

Check your changes

You can use the Command Prompt to ping the hostname that you added in the hosts file. You should see the IP address of the hostname if you mapped it to 127.0.0.1.

Troubleshooting

You should check your administrative rights and make sure you typed in the filename and path correctly if you run into problems. Check your antivirus and firewall settings as certain software may block system file changes.

Conclusion

The hosts file allows you to control the way your system interacts on the Internet. It should, however, be used with caution. Create a copy of your document before you edit it. If you are unsure, you may want to seek professional advice. 

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Must Read

Joker123 Casino: Where Excitement Meets Big Wins

When it comes to online gaming, few names evoke excitement quite like Joker123 Casino. Known for its immersive gaming experience, enticing bonuses,...

Beyond the Red Carpet: Inside the World of Celebrities

Besides the way in which they live their lavish lives right from the type of cars they drive to the clothing they...

Free sports broadcasting Communities: Networking and Support

Free sports broadcastings have always been more than places to gamble and play. A distinct community exists within and around Free sports broadcastings....

Reforma Nails: Beyond the Ordinary Top Coat

Embark on a captivating journey into the realm of nail artistry and professionalism with Reforma Nails! Welcome to an enchanting universe where...

Bean to Cup: Exploring the Art and Science Behind Your Favorite Coffee Shop Brews

In the world of coffee, each cup tells a story a problematic story of expertise, technology, and ardor. As we embark on...