Wondering How to Edit the Hosts File in Windows? If your answer is yes, then I am going to help you out. Because if you are unable to edit hosts file windows 10 then this article is perfect for you to explain about it.
Edit hosts file windows basically is a text based file located in the same place in all modern Windows versions. And in most of the cases, we do not need to access this place and make any changes. But there are times when it becomes a necessary step for us to edit windows host files.
However, in a certain version of Windows, editing host files becomes a touch job. And you end getting an error if you try to save the changes. However, the good part is that there is some other way which you can follow to edit the host files in Windows and there people like know can’t edit hosts file windows 10.
And for this, you can follow these steps:
What Does The Hosts File Do?
Before I go ahead and talk about how to edit Windows host files, let me tell you why we basically edit the host file this article is all about how to edit hosts file windows 10.
Well, the main purpose of using Windows host files is to map friendly domains to the unfriendly IP addresses. As we already know that it is always easy to remember a domain name like Google.com instead of remembering an IP address like 126.96.36.199.
Although, by typing both of these addresses into the address bar would make you reach to the website or can’t edit hosts file windows 10. By typing down, Google is much better than typing an IP address. Also, once you type down Google into the address bar, the DNS server will map the name to the right webpage.
Plus, a host file too is a sort of a DNS server, and it works the same way. And in other words, you can say that you are simply ordering your computer to load a different IP address than a DNS server usually do.
Why edit the Hosts File?
One of the common reasons to edit the host files is if you want to block a website from loading on your computer. You can use this feature as a parental control on your computer. And all you have to do is enter a wrong IP address for a website you want to block. And each time you type down the URL, the website will move to the wrong website. As a result, it will get blocked on your computer and also how to edit hosts file windows 10 access denied.
Even you can use the Windows host files to block malicious or spam websites. There are quite a lot of websites out there which can inject malicious code to your computer whenever you download something.
Talking about another use of Windows host files is that it can speed up your web browsing. In case the DNS server you are using down or not working properly. Then typing down the IP address manually can actually solve the issue for you. As a result, you will be able to load the website in a pretty fast way but you cannot know how to edit hosts file windows 10 without admin rights and you need permission to edit hosts file windows 10.
Windows Hosts File Location
Now the question is what Windows Host File Location is? You will need to know where to find the host file before you go and edit it. To open the file location, you can follow this path:
How To Edit The Hosts File
First of all, you will need to know that the hosts file is a text file. Hence, you will need a text editor to edit the file. However, the good part is that the host’s file does not deal with any hyperlinks or images. Hence, a simple text editor would do the job or else you can see how to edit hosts file windows 10 cmd. You can use the default text editor Notepad on your computer.
Anyway, now go ahead and follow these steps:
First of all, open, the Hosts file by going to the location.
Then right click on hosts file and right click on it and select open with.
After that, use notepad to open the file on your computer.
Editing The Hosts Files
Now we have to edit the hosts files. To make you understand in a better way, I have some examples for you which will help you to understand how to format your entries. Simply put the IP address then use tab to create a space and then add the domain name beside it.
Here are some examples:
Also, in the host file, you will find quite a lot of lines starting with the #Symbol. And it is basically used as a comment. This means, everything you are going to add after the #symbol will not be applicable to the hosts file, and it will be avoided.
Also, if you wish to block any website with the hosts file. Such as YouTube, Amazon, Google, or anything. You have to add a false IP address. For example, you can use the 0.0.0.0 also everything applies to hosts file windows 7 also with hosts file editor. But it is hard to do same for hosts file mac and hosts file android. This can be also used for editing the hosts file windows 10.
Plus, you will need to make sure that when you are adding a URL to the hosts file, you have to make sure that you are avoiding adding the subdomains. Such as www or anything or else it will not work. Also the same goes for mapping ip address to location by find ip address or else you can also know it by finding my ip address.
Saving The Hosts File
In the end, we have to save the hosts file. And these steps will work, no matter which operating system or text editor you are using.
You can also know how to change ip address and see how do i find my ip address where you can get your ip address. If you wonder what does editing the hosts file on mac do then they can change IP address to block websites.
For this, you will need to follow these steps:
- First of all, go to File > Save as.
- Then change the Save As Type option to all files.
- After that, you will need to rename the file to hosts.backupfile, and save it to your desktop.
- Now close the text editor. And then go ahead and locate the hosts file saved on your desktop. Then simply rename the file and delete .backupfile part. Make sure the file name is only hosts.
- Next, you will need to copy the hosts file.
- Now go to the hosts file location that you have opened before.
- Paste the hosts file over here that you copied from the desktop. And confirm the change that you are making.
Related Post: How to set up and use iCloud for Windows
Once you are done, with these steps, Windows host file new settings will be applied. And you are done with your job. Or for more information on host file you read here