Normally, Microsoft will keep alive the hosts file in windows and will not allow you to change it in online by throwing a permission denied error, but it will allow you to replace it with a new file of an updated hosts file which you can copy and replace the file in the destination. So follow the below screenshots to edit or update the hosts file in windows 10 or 8 or 7.
Now you have successfully edited the hosts file in Windows 10 or 8 or 7.
If you find this post is useful/helpful, please follow, like and share. Thank you for visiting my blog!!!