# Local can't create site under Windows due to hosts file

**URL:** <https://community.localwp.com/t/local-cant-create-site-under-windows-due-to-hosts-file/27724>\
**Category:** Support\
**Tags:** hosts-file, windows\
**Created:** [September 15, 2021, 1:20pm UTC](https://community.localwp.com/t/local-cant-create-site-under-windows-due-to-hosts-file/27724 "2021-09-15T13:20:04Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![skland](https://avatars.discourse-cdn.com/v4/letter/s/7c8e57/32.png) [@skland](https://community.localwp.com/u/skland)\
**Post date:** [September 15, 2021, 1:20pm UTC](https://community.localwp.com/t/local-cant-create-site-under-windows-due-to-hosts-file/27724/1 "2021-09-15T13:20:04Z")

</div>

I have this problem too. it keeps telling me that an anti-virus. what to do? I am totally new to computer-related things. can u explain in details?

 ![image](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/2X/3/3f4aa7a5a7fcafb9dca44252aa7029a30fa81107.png)

---

<div class="post-metadata">

**Author:** ![ben.turner](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/ben.turner/32/5366_2.png) [@ben.turner](https://community.localwp.com/u/ben.turner)\
**Post date:** [September 15, 2021, 3:31pm UTC](https://community.localwp.com/t/local-cant-create-site-under-windows-due-to-hosts-file/27724/2 "2021-09-15T15:31:40Z")

</div>

Hey @skland , Welcome to the Local Community Forums!

The Hosts file is a file that lets the computer know where to look for a site when you try to access it in a Web Browser.

Usually, the “Missing Hosts entry” error boils down to one of a couple of things, and you might be able to get things working by following some of the suggestions in this FAQ:

- [FAQ: Help! I’m running into an EPERM error with the hosts file on Windows](https://localbyflywheel.com/community/t/help-im-running-into-an-eperm-error-with-the-hosts-file-on-windows/3508?u=ben.turner)

If you still have issues, can you let us know a little more detail about the system?

- What version of Local are you using?
- What Operating System and OS version is being used?
- Can you please provide your Local Log? See this Community Forum post for instructions on how to do so:
  - [How do I retrieve Local’s Log?](https://localwp.com/community/t/how-do-i-retrieve-locals-log-file/3720?u=ben.turner)

- Does this happen for all sites in Local, or just one?
- Are you able to create a new, plain WordPress site?

---

<div class="post-metadata">

**Author:** ![skland](https://avatars.discourse-cdn.com/v4/letter/s/7c8e57/32.png) [@skland](https://community.localwp.com/u/skland)\
**Post date:** [September 17, 2021, 8:40pm UTC](https://community.localwp.com/t/local-cant-create-site-under-windows-due-to-hosts-file/27724/3 "2021-09-17T20:40:52Z")

</div>

- What version of Local are you using? **6.1.2**

- What Operating System and OS version is being used? - Windows **10**

- Can you please provide your Local Log?  
[local-lightning.log](https://community.localwp.com/uploads/short-url/mikFOU5DxUdQ5ni6B6JaIyPHhiy.log) (104.9 KB)

- Does this happen for all sites in Local, or just one? This is my first site in Local

- Are you able to create a new, plain WordPress site? Yes, I tried half a way and it worked

 ![image](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/2X/1/1edca82839f4de995481e9515d33a13a607b348b.png)

I have disabled my McAfee because I thought it caused the problem but it does not seem to be the case. Help me please Mister Ben. Thank you.

---

<div class="post-metadata">

**Author:** ![skland](https://avatars.discourse-cdn.com/v4/letter/s/7c8e57/32.png) [@skland](https://community.localwp.com/u/skland)\
**Post date:** [September 17, 2021, 8:49pm UTC](https://community.localwp.com/t/local-cant-create-site-under-windows-due-to-hosts-file/27724/4 "2021-09-17T20:49:32Z")

</div>

> [@skland](#):
>
> OS version

64-bit version of Windows

 ![image](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/2X/6/65e0346449e17f1fda09e27742bf79e33136915c.jpeg)

---

<div class="post-metadata">

**Author:** ![ben.turner](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/ben.turner/32/5366_2.png) [@ben.turner](https://community.localwp.com/u/ben.turner)\
**Post date:** [September 20, 2021, 5:38pm UTC](https://community.localwp.com/t/local-cant-create-site-under-windows-due-to-hosts-file/27724/5 "2021-09-20T17:38:49Z")

</div>

Thanks for the Local log and the additional screenshots.

The main error I’m seeing is this one related to `Could not update hosts.` Here’s the full error line:

```auto
{"thread":"main","class":"HostsFileService","error":{"code":101},"stdout":{},"stderr":{},"exitCode":101,"level":"error","message":"Could not update hosts.","timestamp":"2021-09-08T23:58:35.932Z"}

```

You’ll need to do one of two things in order to be able to create new sites:

1. Figure out what’s locking down the hosts file and allow Local to be able to edit that file.
2. Consider using the `localhost` Router Mode setting that’s found under “Preferences \> Advanced \> Router Mode.” Using this mode should allow you to create new sites, but it does mean that some features aren’t available for you to use. For more details on this feature, see this help doc: [https://localwp.com/help-docs/advanced/router-mode/](https://localwp.com/help-docs/advanced/router-mode/)

---

<div class="post-metadata">

**Author:** ![skland](https://avatars.discourse-cdn.com/v4/letter/s/7c8e57/32.png) [@skland](https://community.localwp.com/u/skland)\
**Post date:** [September 21, 2021, 4:01pm UTC](https://community.localwp.com/t/local-cant-create-site-under-windows-due-to-hosts-file/27724/6 "2021-09-21T16:01:56Z")

</div>

OMG thanks I tried using localhost Router Mode and it works! Thanks to you I will precede with my training on being a web developer! 😇 😇 🥰

 ![image](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/2X/5/5a7ab82e59e1f36a5c47afc16e12fc3c11462657.png)

---

<div class="post-metadata">

**Author:** ![system](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/system/32/1_2.png) [@system](https://community.localwp.com/u/system)\
**Post date:** [September 23, 2021, 4:02am UTC](https://community.localwp.com/t/local-cant-create-site-under-windows-due-to-hosts-file/27724/7 "2021-09-23T04:02:31Z")

</div>

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