Looking for:
How to Edit the hosts File on Windows 10 or 11 – How to Edit Hosts file in Windows 10?

When the command prompt icon appears, give it a click. In the subsequent window, type tracert followed by the URL of the website in question, for example:. Next, press the Enter key on your keyboard. The command prompt will then display the IP address of website. In Windows XP and earlier, editing your hosts file was relatively straightforward.
You could simply add an exception to your antivirus, open the hosts file in the Notepad application, and then make your changes. However, Windows 10 added some security measures to prevent users from accidentally modifying this important file. This makes sense, as editing the hosts file could potentially make your favorite websites inaccessible. In the worst-case scenario, it might even make the Internet unusable on your machine.
In Windows 10, the hosts information is stored in a plain text file in the internal System32 folder. The quickest way to gain this is to use a text application that has elevated privileges. To start, press the Windows key and type Notepad into the search field. Search for the Notepad app. Next, right-click on Notepad and select Run as Administrator. Windows 10 will now ask whether you want to allow this application to make changes to your device. Select Yes. Select Run as Administrator.
This launches a privileged instance of the Notepad application. Note that you may be asked to enter an administrative password in order to re-authenticate yourself.
Need a hosting solution that gives you a competitive edge? Check out our plans. Select File and then Open in the Notepad toolbar. Then, navigate to C:WindowsSystem32driversetchosts. In Notepad, open the File name dropdown and choose All Files. Open the File name dropdown and choose All Files.
You can now add your custom IP address and hostname to the end of this file. In the subsequent window, type the following:. To flush the DNS cache, press the Enter key. Early on, a central hosts file was manually maintained and shared by the Stanford Research Institute. This system lead to the invention of domains and top level domains like. In the end, the humble hosts file and innovators like Elizabeth J.
Feinler lead to the invention of the Domain Name System still in use today. First, open Notepad as an administrator by pressing the Windows key, typing in “notepad”, and clicking “Run as administrator”:.
You won’t be able to see any files in this directory because they aren’t text documents. To change the file type, click on the dropdown in the bottom right of the Open menu and click on “All Files”:. Note that everything is commented out with characters, meaning that nothing is actually being read from the hosts file. Modern versions of Windows include a sort of DNS system already, so if you visit localhost it’ll automatically redirect you to If you’re doing some local development and are having problems with localhost, you can just remove the comments from your hosts file:.
Then, open PowerShell by pressing the Windows key, searching for “powershell”, and clicking “Run as Administrator”:. After that, you should be able to visit localhost in your browser and see whatever you’re hacking on. If you’re still having issues, try closing your browser completely, then open a new browser window and try again.
Even though hosts files have fallen out of favor with newer systems like DNS, they still work for legacy reasons. And hackers have definitely taken advantage of this in the past.
What they would do is point a common website like google. Yes No. Sorry this didn’t help. Thanks for your feedback. Can you confirm or tell us if you are still having issues with editing the host file on your computer?
Or is it already resolved? Threats include any threat of suicide, violence, or harm to another. Any content of an adult theme or inappropriate to a community web site. Any image, link, or discussion of nudity.
Any behavior that is insulting, rude, vulgar, desecrating, or showing disrespect. Any behavior that appears to violate End user license agreements, including providing product keys or links to pirated software.
Unsolicited bulk mail or bulk advertising. Any link to or advocacy of virus, spyware, malware, or phishing sites. Any other inappropriate content or behavior as defined by the Terms of Use or Code of Conduct. Any image, link, or discussion related to child pornography, child nudity, or other child abuse or exploitation. Details required : characters remaining Cancel Submit.
Step 1. Step 4. Details required : characters remaining Cancel Submit 10 people found this reply helpful. Remember to re-set the read-only bit after you’re done to prevent other applications from modifying it without your knowledge. Also if you have install tinyfirewall , there is a default option there that prevent the editing of the host file. This applies to any firewall or antivirus you may have installed that has an option to lock editing of the hosts file.
Open notepad. Just because you are an Administrative user, does not mean that everything you do, you do as an administrator; it simply means that you have the ability to do so. When you try and preform administrative tasks – certain applications will be run with administrative privileges such as when you click run as administrator. I would not recommend doing this but if you give your user Full Control on that file it should work as you want it to.
This is a security risk though, please think carefully if you really need this. Check your firewall settings. I just recently came across this issue. Only user of my PC and could not get that hosts file to cooperate. Tried to delete and antivirus pops up telling me it has protected me. I use Avira, so I into my real-time protection configuration, check the security tab and “Protect windows hosts file from changes.
I uncheck, apply, do my change, then check it back and apply. No issue at all once that option was unchecked. When you logon, you get handed a “Kerberos” token which defines your user as both administrator and user – regardless of what control panel tells you. You could always take this one step further and launch cmd as an admin, from cmd – you can launch “taskmgr” and then kill and re-open “explorer.
Since taskmgr is running as an admin – processed launched under this context explorer. UAC is meant to be there to allow you to stop and think berfore you do something which could have big ramifications. Changing the access rights for the User group to full control for the hosts file allowed me to save it without having to run stuff as administrator.
The fact that my account is an administrator, and the administrators had full control of the file didn’t allow me to edit it. Makes no sense. Go Windows! I had this problem and eventually discovered that the hosts file was being locked by my firewall Tinywall. Temporarily closing the firewall worked. To find out what program is locking the file, I recommend a small utility called Unlocker by Cedrick Collomb. The download is no longer available on the author’s website, but I was able to obtain it from Softpedia.
Sign up to join this community. The best answers are voted up and rise to the top. Stack Overflow for Teams — Start collaborating and sharing organizational knowledge. Create a free Team Why Teams? Learn more about Teams.
How to Edit Hosts File in Windows 10 {% Working}.Edit the Windows Hosts File to Block or Redirect Websites
replace.me › en-us › windows › forum › all › unable-to-edit-h. In your Notepad, Click File > Open and search for the following file: c:\Windows\System32\Drivers\etc\hosts; You can edit the changes as normal; Click File >.
Cant edit hosts file windows 10 free download.How to Edit Hosts File in Windows 10
Click Run as administrator. This opens Notepad as an administrator. You may have to click Yes on a security warning to open the app. Click the File menu and select Open. This opens your file chooser. Navigate to the path that contains the hosts file. You can paste that path into the bar at the top of the window and press Enter to go there. It’s the menu toward the bottom-right corner of the window. You should now see a handful of files, including the hosts file.
The hosts file is now open for editing. Make changes to the file. Now that the file is open, you can add the correct lines to the file. When you add a line to the hosts file, you’ll want to enter the IP address first, followed by the domain name you’re mapping it to. Separate the two with a space or a tab, and keep each entry on its own line. Instead of deleting a line, just add a hash symbol to the beginning. This way you can easily reactivate old entries if you accidentally disable something you needed.
Click the File menu and select Save. This saves your changes to the hosts file. Include your email address to get a message when this question is answered. By using this service, some information may be shared with YouTube. You need administrator rights to do this. Helpful 1 Not Helpful 0. Helpful 0 Not Helpful 0. Be careful deleting the old Hosts File! You may end up accidentally deleting your new one and losing your edits! Make sure to scan your computer and remove the bad program either before or after doing this.
You Might Also Like How to. How to. I had this problem and eventually discovered that the hosts file was being locked by my firewall Tinywall. Temporarily closing the firewall worked. To find out what program is locking the file, I recommend a small utility called Unlocker by Cedrick Collomb. The download is no longer available on the author’s website, but I was able to obtain it from Softpedia.
Sign up to join this community. The best answers are voted up and rise to the top. Stack Overflow for Teams — Start collaborating and sharing organizational knowledge.
Create a free Team Why Teams? Learn more about Teams. Windows 10, can’t edit hosts file Ask Question. Asked 7 years, 1 month ago. Modified 1 year, 9 months ago. Viewed k times. Improve this question. Tobb Tobb 1 1 gold badge 5 5 silver badges 9 9 bronze badges. These limitations are put in place to keep people from “accidentally” infesting a system with malicious code. I don’t see the point of having the same security mechanisms for my 63 year old father who believes everything he sees on the internet, and me who have grown up with computers to such an extent that I’m suprised one is not attached to me.
I don’t want to spend time bypassing security measures that in practice offers me no security. Then it’s pretty annoying that I have to spend even more time disabling these measures, and even if I appearantly have, they are still there. Add a comment. Sorted by: Reset to default. Highest score default Date modified newest first Date created oldest first. Improve this answer. Olivia Olivia 3 3 silver badges 2 2 bronze badges.
Appearantly, administrator users does not gain the privileges of the administrators user group. When I gave the Users group full control of the file I was able to easily save it.
Makes sense to me, but hey, at least it’s working. None of these work for me. I cannot change Secutiry Settings and permissions either. Access is denied. Thumbs up! This file isn’t showing read-only — PlanetUnknown. PlanetUnknown It was when I wrote this answer, on a machine with a fresh install of Windows It might not be anymore after some of the recent updates. I’ve quite literally tried all the solutions on the net and it was this!
On my windows8, hosts file isn’t read-only. This applies to any firewall or antivirus you may have installed that has an option to lock editing of the hosts file e.
David d C e Freitas 4, 3 3 gold badges 25 25 silver badges 34 34 bronze badges. Aristos Aristos 7 7 silver badges 17 17 bronze badges. This happend to me, and i was properly notified when i tried to erase the file :- , otherwise you only see “file in use”.
Seems then that protecting the file is made by just openinig for editing in lock mode, so no one could write or erase it untill you tinywall release it. Since my zonealarm antivirus did not have a visible option to “lock hosts file” I thought it just didn’t. If there is, it means Notepad does not have administrative access, and that you need to close Notepad and run it as administrator.
There are two addresses, There are significant differences between Rarely, a program running on your PC might have problems if you use That means the browser ignores the hosts file entirely and uses a secured DNS server specified by the browser instead, so any addresses you attempt to block using the hosts file will be accessible.
We select and review products independently. When you purchase through our links we may earn a commission. Learn more. Windows ». What Is svchost.
Best MP3 Players. Best Android Smartwatches. Best Galaxy Z Flip 4 Cases. Best iPhone 13 Wallet Cases. MagSafe Battery Packs. Best Nintendo Switch Accessories. Best Uninterruptible Power Supplies. Best Xbox Series Headsets. Best Ergonomic Keyboards. Best Tripod Heads. Reader Favorites Best Linux Laptops. Best Wi-Fi Routers.