If you tried to edit Hosts file from Finder and encountered this problem/ error:
You don’t own the file “hosts” and don’t have permission to write to it.
then you should change the content of Hosts via Terminal, which will work fine.
Changing Hosts file in Terminal- Instructions
- go to Terminal
- Enter this: sudo nano /private/etc/hosts
- You might need to enter the password that you use for your Mac account
- Edit Hosts file, first part of the line is the IP and the second part is domain, for example:
- 188.8.131.52 website.com www.website.com
- To Save click control+ O and hit enter
- That’s it, your Hosts file is successfully edited.