Hosts File error on Windows 10

I’m getting the “Warning! Missing hosts entry. This site may be inaccessible.” Error. when I click “fix it”, I get the error that says "Un-oh! Could not update hosts file. Local ran into a problem when trying to update the hosts file. Please ensure that the hosts file is not locked by anti-virus. I I don’t have an external anti-virus, but I have disabled Windows defender “real-time protection”. I also have the windows firewall disabled. I have verified that the hosts file is not set to read-only and all “full permissions” are granted. I have looked through all the various posts and can’t find a solution. Isn’t there a way that we can just manually change the hosts file? What does the entry need to be? Thanks.

Hi, same issue here. No antivirus activated
How could we fix it please ?
Thanks !

Hey @crankycowboy and @Laura85! Thanks for joining the Local community here.

Sorry to hear that you’re having trouble with Local accessing the hosts file in Windows. We’ve definitely seen this issue come up before but it can be tricky to pinpoint because of all the software options out there. Some folks have had success by closing Local and then right clicking on the app and “Running as Administrator” such as found in this post: Uh-oh! could not update hostsfile

Have you guys tried that? Does it sound like this lines up with your experience?

@crankycowboy, you are correct that you should be able to manually update the hosts file. Basically the hosts file needs an entry to point whatever your Local site’s domain is to your own computer, so if you add an entry like this:

127.0.0.1 example.local

Save that in your hosts file (replacing example.com) and you should be able to keep moving along.

Hey @mattwhosthat , I’ve tried to close and run it as administrator but the problem is still here. I’ve heard we have to modify the host file by inserting a line of code, can I try this method and what have I to do for that ?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.