How to edit hosts file in windows

What does the hosts file does on machine:

Hosts file are similar to address book. As soon as you open any website in your browser the computer consult yours hosts file that “Is there any IP address assigned for this website in hosts files?” if its there then your browser ping that IP address in order to get the website data. If there is no any entry into the hosts files then computer asks the IP address of this website to their “Internet Service Provider” ISP. And then it send request to that IP address

If you want to edit your hosts file then simply open hosts file by going “C:WindowsSystem32driversetc” see pics below

edit hosts windows

just open your hosts files using notepad and edit it. If you are seeing a problem like “You don’t have permission to save on this location” below

edit hosts windows

then open notepad like below it will allow you

edit hosts windows with notepad

 

and then open the file hosts (by using notepad) from there and save it.

Related posts:

The following two tabs change content below.

Chandra Shekhar

GCP Architect
Chandra Shekhar Pandey is Google certified Cloud engineer, I am Magento2 Trained developer. Having huge experience in designing cloud solution. I have around 12 years of experience with world enterprise IT companies and fortune 500 clients. During my architecture design I am always caring about high availability, fast performance and resilient system. From the programmer background I have huge experience in LAMP stack as well. Throughout my carrier I have worked on Retail, E-Learning, Video... Read More about Chandra Shekhar

Latest posts by Chandra Shekhar (see all)