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

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...

Skin Serenity: Unveiling the Soothing Power of CBD Cream

In the area of skincare, the spotlight has currently shifted to CBD-infused merchandise, and main the rate is the wonderful CBD Cream. 

Veins Unveiled: The Art and Science of Phlebotomy

In the area of healthcare, the art and technology of phlebotomy stand as an important gateway to knowing the internal workings of...

Bench Brilliance: A Comprehensive Guide to Kitchen Bench Restoration

The kitchen bench, an important hub for culinary creativity and shared moments, regularly bears the marks of infinite meals and family gatherings....