Warning! Missing Host Entry

What issue or error are you experiencing?

Warning! Missing hosts entry. This may be inaccessible.

Uh-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.

What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc

I am trying to create a site using multisite which requires the router mode as site domains. When trying to run the site i get the above error. I am able to run the site just fine in locahhost mode.

I do not have any antivirus installed except for windows defender which i have disabled. I also changed the permission of the host file to not be read only but still get this error.
I really want to ceate a multisite so would like to get this working.

System Details

  • Local Version:

  • Operating System (OS) and OS version:
    Windows 10

Local Logs

Attach your Local Logs here (Help Doc - Retrieving Local’s Log)
local-logs.zip (56.8 KB)

Security Reminder
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.

Hi @amaskey

If you create a different, new, blank site as a test do you still get the error? Or is it just happening with this multisite test?

Is this a work issued machine that might have privileges locked down by an IT admin? It looks like in the log there are still permissions issues.

Are you running other developer applications simultaneously? That could also cause similar issues. Apps like MAMP, XAMPP, or Docker for example.

Yes creating a new blank site I get the error as well. Its not just with multisite but with the local domain router option. Any site while using this setting does not work. localhost router mode works just fine.

This is not a work machine, its my personal laptop. And no, not running other apps simultaneously.

In order to refresh here and start with a clean slate could you give the below troubleshooting steps a try?

  • Export any sites that you have on Local and save them to a folder somewhere on your computer.

  • Fully uninstall Local from your computer.

  • Install the latest version of Local on this link.

  • Once installed, please restart the computer.

  • When the computer is restarted and turned on, close any applications that automatically run in the background (AntiVirus, Firewall, and other Developer applications included).

  • Check and see if the issue still persists. If so, please provide us with an updated log. Retrieving Local’s Log File

Keep us posted and we’d be happy to help further!

Did a complete uninstall/reinstall but still having the same issue. Logs atached.

local-lightning.log (192.5 KB)
local-lightning-verbose.log (925.9 KB)

Something still seems to be blocking Local on your machine here:

{"class":"Process","level":"warn","message":"nginx: [emerg] bind() to failed (10013: An attempt was made to access a socket in a way forbidden by its access permissions)","process":"nginx","thread":"main","timestamp":"2024-03-08T13:22:15.566Z"}

Here are some steps to help you identify and address this:

  • Stop all sites that are running in Local

  • Force quit Local

  • (If using Mac) Run the command lsof -nP -iTCP -sTCP:LISTEN

  • (If using Windows) Run the command netstat -ano

What you’ll be looking for here is to see when sites are stopped and Local is properly shut down if there are still programs running on ports 80 and 443. These may be conflicting with Local or the system may be reporting Local is still running.

Once you run that command you should see a list of listening ports. If you see a particular program making use of those ports, you can then kill that process by running sudo kill -9 XXX where XXX is the PID number of that process. (On Windows you will use taskkill /F /pid XXX where XXX is the PID number of that process)

After that, you should be able to retry. Keep us posted if you have any questions or continuing issues.

There are also some more details around this and other troubleshooting steps at this link if needed: Stopping Whatever Is Listening On Port 80.

I found these after running that command:


i did the taskkill /f /pid 4656. Did the netstat again and confirmed those were gone. Tried local and still the same error.

Is your user set as an admin? Could you test creating a new admin user and see if it works for that account?

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