
- #How to add to windows host file how to#
- #How to add to windows host file windows 10#
- #How to add to windows host file Pc#
DNS over HTTPS works the same way as a regular DNS server, however DNS over HTTPS encrypts your queries to boost your privacy. Recent versions of Google Chrome, Mozilla Firefox, and Microsoft Edge all use DNS over HTTPS (DoH) by default. If You Can Still Connect to Blocked Addresses
#How to add to windows host file Pc#
Rarely, a program running on your PC might have problems if you use 127.0.0.1, so it is best to stick with 0.0.0.0. There are significant differences between 127.0.0.1 and 0.0.0.0, but in most cases either will work. There are two addresses, 127.0.0.1 and 0.0.0.0, that are commonly used in the hosts file to block traffic. Once you’ve saved successfully, go ahead and exit Notepad. If there is, it means Notepad does not have administrative access, and that you need to close Notepad and run it as administrator. There shouldn’t be a popup after you click save. Once you’re done adding lines, click File > Save to save your changes.


Note: It isn’t necessary to include the comment for the hosts file to work, but commenting files when you edit them is an excellent habit. The comment must have a hashtag preceding it. The Comment – Where you describe what the line does.The Web Address – This is the website address you want to block.The IP Address – This tells your PC where to look for a website.The lines that go into the hosts file can be broken up into three basic components, each separated by at least one space. Once the hosts file is open, you can start adding lines to block websites. Notepad is set to look for “.txt” files by default, so you’ll need to set it to look for “All Files” in the drop down menu instead. Once Notepad is open, click on File > Open, and navigate to “C:\Windows\System32\drivers\etc” On the right-hand side, click the small downward-facing arrow to reveal more options. Click on the start button, and then type “Notepad” into the search bar. Running Notepad on Windows 11 is the same process as Windows 10, except “Run as administrator” is not displayed immediately. To do this on Windows 10, click the start button, type “notepad” into the search bar, and then on the right, click “Run as administrator.” You’ll need to run Notepad as administrator to edit the hosts file. Avoid using a word processor - the differences between Notepad and a word processor like Wordpad can sometimes cause problems.
#How to add to windows host file windows 10#
There are a variety available, but both Windows 10 and 11 come with Notepad.

You can edit the hosts file with any text editor.

You need administrative permissions to edit it, which means that you can’t just open it in a normal Notepad window. The hosts file is located in “C:\Windows\system32\drivers\etc” on both Windows 10 and 11. If the hosts file tells your computer to find a web address at an IP address that won’t connect - like 0.0.0.0 - it blocks access to the website. When a web address and an IP are inserted into the hosts file, it will provide that information to your computer any time you try to connect to that web address. If your PC can’t find an IP address in the hosts file, it checks the DNS cache or connects to a DNS server. The hosts file is the first place your PC will check to find an IP address for a website, but by default, the hosts file doesn’t contain any. It needs the correct IP address associated with the web address in order to make a connection.
#How to add to windows host file how to#
When you type in a regular web address to access a website, like, your PC doesn’t automatically know how to connect.
