# Could not update host file

**URL:** <https://community.localwp.com/t/could-not-update-host-file/44731>\
**Category:** Support\
**Tags:** windows\
**Created:** [September 26, 2024, 11:43am UTC](https://community.localwp.com/t/could-not-update-host-file/44731 "2024-09-26T11:43:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![CBgamer15](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/cbgamer15/32/22785_2.png) [@CBgamer15](https://community.localwp.com/u/CBgamer15)\
**Post date:** [September 26, 2024, 11:43am UTC](https://community.localwp.com/t/could-not-update-host-file/44731/1 "2024-09-26T11:43:53Z")

</div>

Ensure that the hosts file is not locked by anti-virus!  
 ![2](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/3X/b/9/b90f1221fbed68bf621ff291597d54759c7939c6.png)  
 ![1](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/3X/2/0/20d9c9c29a5f6c316d107e35fa3752c007e7a81c.png)

---

<div class="post-metadata">

**Author:** ![Nick-B](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/nick-b/32/16140_2.png) [@Nick-B](https://community.localwp.com/u/Nick-B)\
**Post date:** [September 26, 2024, 12:50pm UTC](https://community.localwp.com/t/could-not-update-host-file/44731/2 "2024-09-26T12:50:06Z")

</div>

Hi @CBgamer15

There should be another prompt that comes after that `Host Redirection` one and looks like this:

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

You might have to click on the box in your screenshot first to get the second one to come up, or try clicking on the three dots `...` to adjust your notification settings. If you’re still having trouble check to ensure you running your machine as an admin user and that the Hosts File is able to be edited and not set to Read Only.

> [@Help! I'm running into an EPERM error with the hosts file on Windows](https://community.localwp.com/t/help-im-running-into-an-eperm-error-with-the-hosts-file-on-windows/3508):
>
> This is usually caused by the hosts file being set to read-only or locked by anti-virus. 1. Remove Read-only Attribute Go to C:\Windows\System32\drivers\etc Right-click on the hosts file and go to “Properties” Uncheck “Read-only” Click “Apply” Re-open Local Screenshot 2. Anti-Virus/Internet Security Avira See [https://answers.avira.com/en/question/avira-blocks-hosts-file-what-can-i-do-90](https://answers.avira.com/en/question/avira-blocks-hosts-file-what-can-i-do-90)Kaspersky Total Security Open Kaspsersky Total Security Go to “More Tools” Go …

---

<div class="post-metadata">

**Author:** ![Nick-B](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/nick-b/32/16140_2.png) [@Nick-B](https://community.localwp.com/u/Nick-B)\
**Post date:** [September 26, 2024, 1:10pm UTC](https://community.localwp.com/t/could-not-update-host-file/44731/3 "2024-09-26T13:10:18Z")

</div>

@CBgamer15 A user from a previous post shared this as well which looked to resolve the same issue:

> [@Unable to update host file error - have tried all solutions in forum, UAC prompt for cmd failing?](https://community.localwp.com/t/unable-to-update-host-file-error-have-tried-all-solutions-in-forum-uac-prompt-for-cmd-failing/41584/18):
>
> If you are encountering the Cannot Edit Hosts File error and do not receive a prompt asking to allow “Windows Command Processor” to make changes to your device such as in the following image, before the error happens, here is a solution to try. [Command] Check If Powershell PATH Variable Exists For User & Add It If Not Press the windows key or click the start button and type env, then click “Edit the system environmental variables” or manually locate it in the Advanced System Settings.

---

<div class="post-metadata">

**Author:** ![CBgamer15](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/cbgamer15/32/22785_2.png) [@CBgamer15](https://community.localwp.com/u/CBgamer15)\
**Post date:** [September 26, 2024, 2:21pm UTC](https://community.localwp.com/t/could-not-update-host-file/44731/4 "2024-09-26T14:21:49Z")

</div>

Nope didn´t work for me same thing

---

<div class="post-metadata">

**Author:** ![Nick-B](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/nick-b/32/16140_2.png) [@Nick-B](https://community.localwp.com/u/Nick-B)\
**Post date:** [September 26, 2024, 2:27pm UTC](https://community.localwp.com/t/could-not-update-host-file/44731/5 "2024-09-26T14:27:41Z")

</div>

Thanks for trying @CBgamer15 can you manually retrieve your Local Logs for us to be able to take a further look? We have some instructions for finding those here outside of the app.

> **[Retrieve Local’s Log File](https://localwp.com/help-docs/troubleshooting/retrieving-locals-log-file/#windows-10)**
>
> A big part of troubleshooting errors, on any website or application, is the log file. This file contains a record of actions or errors that have occurred when a process is done. When reaching out for…

---

<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:** [December 25, 2024, 2:28pm UTC](https://community.localwp.com/t/could-not-update-host-file/44731/6 "2024-12-25T14:28:01Z")

</div>

Closed on December 25, 2024, 2:28pm UTC

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