5 Fixes When the Hosts File Is Not Working on Windows
Meet Bhaskar, your friendly neighborhood tech enthusiast-turned-wordsmith. For the past few years, he’s been your go-to guide for demystifying iOS, Android, macOS, and Windows platforms. While he holds a B.Tech degree, he has dedicated himself to simplifying tech complexities for all and has lent his expertise to publications like iGeeksBlog, The Writing Paradigm, and more. His forte lies in crafting easy-to-follow how-to guides and in-depth articles, making the intricate world of technology accessible to all. When not immersed in the tech world, you’ll find him enjoying music or sports.
Afam has been a content writer with Guiding Tech Media since August 2023. However, his experience in tech writing dates back to 2018, when he worked as a freelance writer for Make Tech Easier. Over the years, he has grown a reputation for publishing quality guides, reviews, tips, and explainer articles. His work is featured on top websites, including Technical Ustad, Windows Report, and Next of Windows. He has training as a Microsoft Certified Professional and has covered more Microsoft-related guides on these platforms.
Basic Fixes:
Fix 1: Flush DNS Cache
The DNS cache stores information about previously visited websites, and if this data becomes outdated or corrupted, it can lead to conflicts with the Hosts file entries. Byflushing the DNS cache, you are clearing this stored information and forcing the system to re-query and update the DNS records.
Step 1:PressWindows+Son your keyboard > typeCommand Prompt> clickRun as administrator> selectYeswhen prompted.
Step 2:Enter the below-mentioned command in your Command Prompt window and hitEnter.
Now, you can see a confirmation message saying, “You’ve successfully flushed the DNS.” Once you see it, restart your device to apply the changes and check if this fixes the problem.
Fix 2: Disable the Proxy
Disabling the proxy lets the system use the hosts file directly. This means it can find website addresses based on the information in the hosts file. This is useful when you want exact control over resolving domain names. It ensures that the information in the hosts file is used first so the system can find addresses more reliably and accurately. Here’s how to do so:
Step 1:Press theWindows + I keys> open theSettingsapp.
Step 2:Head toNetwork & Internet> selectProxy.
Step 3:Under Automatic proxy setup, turn off the toggle forAutomatically detect settings.
Step 4:Under Manual proxy setup, clickEditnext to Use a proxy server.
Step 5:Turn off the toggle forUse a proxy server> clickSave.
Fix 3: Reset the Hosts File
The Hosts file is responsible for mapping hostnames to IP addresses, and if corrupted or misconfigured over time, it can lead to connectivity problems. One viable solution when encountering issues with its functionality is to reset the Hosts file. Here’s how to do so:
Step 1:Press theWindows keyon your keyboard. In the search box, typeThis PC> clickOpen.
Step 2:To find the Hosts file, enter the location below in the address bar and pressEnter.
Step 3:Right-click on thehostsfile and select theDeleteicon.
Step 4:ClickContinueon the pop-up and selectYesin the prompt.
Step 5:Now, head to a new folder. Right-click in the empty area, selectNew, and chooseText Document.
Step 6:Open the file and paste the below information into it.
Step 7:ClickFile> selectSave As.
Step 8: Renamethe file to hosts. Ensure that the Encoding isUTF-8and clickSave.
Step 9:Now,copythe hosts file andpasteit into the new folder.
Grant the required permissions and restart your device. This should fix your Windows Hosts file.
Fix 4: Reset NetBIOS Cache
If the Hosts file is not working properly, resetting the NetBIOS cache can help. The NetBIOS cache is like a storage place for names and their matching IP addresses. If this storage gets messed up, it can cause problems finding addresses, which affects the Hosts file.
Step 1:OpenCommand promptwith admin rights.
Step 2:Type the below mentioned in the CMD window and hitEnter.
Fix 5: Disable DNS Over HTTPS (DOH)
The DoH protocol encrypts DNS queries, potentially bypassing local DNS configurations, such as those specified in the Hosts file. This encryption can interfere with the system’s ability to resolve domain names according to the entries in the Hosts file. To disable it, follow the steps below.
Note:We use Chrome but the steps are similar for other web browsers like Firefox.
Step 1:Launch theChrome browser> click thethree-dot icon> chooseSettings.
Step 2:Navigate toPrivacy and securityfrom the left and chooseSecurityon the right.
Step 3:Scroll down and toggle offUse secure DNS.
Was this helpful?
Last updated on 23 July, 2024
Leave a ReplyCancel reply
Your email address will not be published.Required fields are marked*
Name*
Email*
Comment*
Δ
Read Next
The article above may contain affiliate links which help support Guiding Tech. The content remains unbiased and authentic and will never affect our editorial integrity.
More in Windows
How to Save Image from Magic Select Tool in Paint 3D
3 Ways to Check Network Adapter Speed on Windows 11
JOIN THE NEWSLETTER
Get Guiding Tech articles delivered to your inbox.
© 2024 Guiding Tech Media. All Rights Reserved.