Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk2 min

Hosts File Access Denied as Admin: What to Check and How to Fix It

Run Notepad as administrator, open the existing hosts file from its Windows system folder, and save from that elevated window. Here’s what to check if access is still denied.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If you see “Access Denied” when editing the hosts file as admin, first make sure the text editor—not just your Windows account—is running with administrator permissions. Open the existing file from inside that elevated editor, then save. The usual path is %WinDir%System32DriversEtchosts.

Why administrator status may not be enough

Being signed in to an administrator account does not automatically make every app run with elevated permissions. Windows can still block an editor that was opened normally from writing to a protected system folder. Microsoft’s access-denied guidance recommends starting Notepad as administrator, then opening the file in that elevated window. Its cited troubleshooting page covers Windows Server editions, so it supports this workflow but does not diagnose every Windows 10 or Windows 11 access-denied error. Microsoft’s access-denied guidance

As an Amazon Associate I earn from qualifying purchases.

Open and save the existing hosts file with elevation

  1. Search for Notepad, right-click it, and select Run as administrator. Approve the Windows elevation prompt if one appears.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  2. In the elevated Notepad window, select File > Open. Navigate to %WinDir%System32DriversEtc. This commonly resolves to C:WindowsSystem32driversetc, though the Windows directory can differ.

    #1 Best Overall
    CORRSQ 30-in-1 Bootable USB Drive
    • 1. COMPATIBLE WITH WINDOWS 11, 10, 8.1 & 7 Designed for compatible 64-bit PCs and laptops that support USB booting. Works with Windows 11, Windows 10, Windows 8.1 and Windows 7 installation and recovery options.
    • 2. INSTALL, REINSTALL & REPAIR Provides access to installation and recovery options for startup failures, boot errors, system crashes, failed updates, system repair and reinstallation. Results depend on the condition of the computer and the cause of the problem.
    • 3. READY-TO-USE BOOTABLE USB Reusable installation and recovery media that helps eliminate the need to download large system files or create bootable media yourself. Insert the USB drive, open the computer’s boot menu and select the appropriate installation or recovery option.
    • 4. HELP KEEP OLDER PCS USEFUL Refresh, reinstall or maintain a compatible older computer before deciding whether replacement is necessary. Suitable for home computers, office workstations, PC enthusiasts and technicians who regularly work with supported systems.
    • 5. IMPORTANT COMPATIBILITY & LICENSE INFORMATION Supports compatible 64-bit computers with UEFI or Legacy BIOS USB booting. No Windows license, activation key or product key is included. Activation may require an existing digital license or a separately purchased valid product key. Back up important files before installation or repair.
  3. If hosts does not appear in the Open dialog, change the file-type filter to All files (*.*). Open the existing file named hosts, not a file named hosts.txt.

  4. Make the intended edit and save from the same elevated Notepad window. The hosts file is plain text: put an IP address first, followed by one or more hostnames separated by spaces or tabs. Lines beginning with # are comments. Microsoft’s hosts-file guidance

    Rank #2
    Hiren’s BootCD PE Recovery & Diagnostic Bootable USB Flash Drive
    • 🧰 All-in-One Recovery Solution: Includes the latest Hiren’s BootCD PE preinstalled with powerful diagnostic and recovery utilities.
    • ⚙️ Repair & Troubleshoot Any PC: Fix boot issues, recover data, clone drives, remove viruses, and reset forgotten Windows passwords.
    • 💾 Plug & Play Bootable USB: No installation required. Simply plug into your computer, boot from USB, and start recovering immediately.
    • 🚀 Fast & Reliable Performance: Professionally tested 3.0 USB flash drive ensures quick load times and long-term durability.
    • 💡 Compatible with Most Systems: Works with desktops, laptops, and all major Windows versions (XP, 7, 8, 10, 11).

If saving is still denied

Alternative: Microsoft PowerToys Hosts File Editor

PowerToys includes a Hosts File Editor, but it still needs the permissions required to save changes. Its documentation says the tool can be read-only when disabled and can show “Failed to save hosts file” when an edit is attempted without administrator permissions. Choose it if you already use PowerToys and prefer its interface; for a straightforward one-time change, elevated Notepad avoids installing or opening another utility. Microsoft PowerToys Hosts File Editor documentation

Rank #4
64GB Bootable USB Installer for Windows 11, 10 & 7 Home/Pro with WinPE Repair Tools
  • [Win OS Install or reinstall] — Boot from the USB to install or reinstall Win 11, 10, or 7 Home & Pro editions. Includes OS installations and reinstallations media plus WinPE Utility Suite.
  • [WinPE Repair & Recovery Tools] — Boot into the included WinPE utility suite to backup system and important files, troubleshoot startup problems, repair boot issues, recover data, recover Win User accounts password, and diagnose common PC problems.
  • [All-in-One PC Rescue USB] — Combines Win 11, 10, and 7 installation media with PC repair, recovery, and diagnostic tools on one bootable 64GB USB drive, helping you troubleshoot and restore a computer without needing multiple discs or downloads.
  • [Support] — Full instructions are included in packaging plus a printable copy of the instructions with troubleshooting information on the device. Also, a video “How to boot from a bootable USB drive.mp4” to help guide you through starting a PC from a USB drive. If you need help using the USB please contact us for assistance, we are here to help.
  • [Video] - If you are new to booting from a USB drive or need a refresher see our video "How to boot from USB drive" both in description and on USB device.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Reset the file only if you want Windows’ default contents

Microsoft’s reset instructions apply to Windows 10 and Windows 11. Keep a backup of the current file before replacing it, since custom entries may be intentional.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Prepare the default hosts-file contents using Microsoft’s instructions and save the replacement as hosts, with no file extension. In Save As, select All files (*.*) so the editor does not append .txt.

    Best Value
    32GB Bootable USB Drive 3.0 for Latest Windows 11 pro/Home,Widows10 pro/Home USB Installer Dollar,Multi-Language,UEFI and Legacy,System Install,Password Reset,Data Recovery.Fix Desktop & Laptop.
    • ✅Important Note 1: This not an automatic repair tool. Follow the instructions in Figures 3 and 4 to set up booting from USB drive to enter USB PE system, Supported UEFI and Legacy.System files for Installation Only, No License.
    • ✅Important Note 2: None of the functions require booting into a regular Windows system. It is recommended not to plug it into a normal system as an ordinary USB flash drive, since some tools may be falsely detected as viruses by antivirus software.Remove the USB drive after system repair/Installation is completed.
    • ✅Backup important data by this USB PE system before installing Windows, The data that needs to be backed up is usually located on the desktop of the system's "C:" drive.
    • ✅Bootable USB 3.0 for Installing Windows 11/10/ (64Bit Pro/Home/Education ), Latest Version, Multilingual package support(For specific operation instructions, please refer to the manual.),No TPM Required.Key not included.
    • ✅Windows Password Reset : If BitLocker is enabled on the hard drive, you must disable BitLocker before resetting the Windows password.
  2. In the driversetc folder, rename the current file Hosts.old to retain a backup.

  3. Copy or move the prepared replacement file into the folder. Approve the administrator prompt if Windows displays one.

Follow the full Microsoft reset procedure for the default contents appropriate to your Windows version.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.