zaldhie
Well-known Netizen
- Apr 22, 2021
- 502
- 1,807
- 108
- ♀️
- Thread Author
- #1
"FYI: Alam nyo ba na importante ang HOST File sa computer nakakatulong po ito na hindi ka basta mapapasok ng adware or threat online kapag updated hostfile mo "
What is the Hosts File in Windows 11?
When you open a website on your PC, the browser looks for the IP address of the domain name from a DNS server. However, before that, it goes to the “hosts” file on your Windows PC first to find if the user has specified an IP address for a particular domain. If you have specified a website to a non-existent IP (such as 0.0.0.0), the website won’t open and will effectively be blocked. In essence, the hosts file keeps a list of all the websites that you have blocked on your PC.Having said that, if you are using one of the popular DNS servers in your browser, the browser will ignore the hosts file. It will directly go to the DNS server or DNS cache to fetch the IP address of the website (domain name) you visit. To avoid this situation, we will suggest enabling DNS over HTTPS (DoH) on Windows 11 from the system settings. It will ensure that you get all the encrypted protection of DoH while also taking the hosts file into account. In this scenario, the websites mentioned in the hosts file will be blocked, and you will also get encrypted DNS communication.
So, to sum up, the hosts file in Windows 11 allows you to block websites by pointing them to a made-up IP address. It’s an easy and effective solution for users who want to restrict certain websites on their PC, from all browsers.
How to Find the Hosts File in Windows 11
1. First, press the Windows 11 keyboard shortcut “Windows + E” to open the File Explorer. Here, double-click to open the “C” drive.2. Next, move to the “Windows” folder.
3. After that, navigate to system32 -> drivers -> etc folder. Here, you will find the “hosts” file that we need to edit. It will be a “File” type and not “Calendar”.
4. If you don’t see the “hosts” file in this folder, click on “View” in the top menu and click on “Show”. Now, choose “Hidden items“. This will show all the hidden items, including the “hosts” file.
Windows 11 Hosts File Location
You can navigate to the following address – “C:\Windows\system32\drivers\etc” to find the hosts file on Windows 10 and 11. While you need admin permissions to edit the hosts file at its original location, we will take a slightly different route here. So keep reading.How to Edit the Hosts File in Windows 11
1. First, make a copy of the “hosts” file to a different location, like the Desktop. It will allow you to edit the Hosts file in Windows 11 with ease and without admin privileges.2. Now, move to the copied hosts file, right-click on it and choose “Open With”. Here, select “Notepad“.
3. To block websites using the “hosts” file in Windows 11, add a line at the bottom by following the below syntax. Here, you are pointing twitter.com to 0.0.0.0, which is a non-existent IP address. The sentence after # is a comment, and it’s optional. You can add as many websites to the hosts file as you want using the below syntax.
0.0.0.0 twitter.com #Your PC will block twitter.com
4. Now, click on “File” in the top menu and choose “Save“.
5. After that, copy and move the modified “hosts” file to the “etc” folder to replace it. It will ask for administrator permission, and you need to click on “Continue“.
6. Finally, go ahead and open twitter.com, and it won’t open on your Windows 11 PC since the IP address for this website is mapped to a non-existent IP address. So that is how you can find and edit the hosts file in Windows 11 to block websites.
7. In case you want to unblock the website, simply remove the line you added in the hosts file or add # in the beginning of the line to turn the whole text into a comment. This will make the command ineffective. Now, move the modified hosts file to the “etc” folder again to have the changes take effect.
Frequently Asked Questions (FAQ)
What is the Hosts file in Windows 11?The hosts file essentially contains a list of websites you want to block on your PC. You can also use the hosts file in Windows 11 to point a domain name to a particular IP address.
Where to find the Hosts file in Windows 11?
The hosts file in Windows 11 is located at C:\Windows\System32\drivers\etc .
What is the use of the Hosts file in Windows 11?
You can use the hosts file in Windows 11 to block websites on your PC by pointing them to a non-functional IP address.
Can we enable DNS over HTTPS with a Modified Hosts file?
Yes, you can use DNS over HTTPS and route traffic to the ghosts file at the same time. However, you need to enable DNS over HTTPS from Windows Settings and not through the browser.