0

I blocked some site in Hosts File, but when I tried unblocking it by deleting the indicated sites. I'm still unable to access the sites. Can anyone help me with this?

I blocked the sites by using this resolution. Can't block connections to google via HOSTS file

1
  • Are you saving the file after editting? Have you tried flushing your DNS cache? Have you tried using incognito mode in case the sites are blocked?
    – Burgi
    Nov 27, 2019 at 9:36

2 Answers 2

1

How did you unblock? All that's necessary is to add # to the beginning of the line, or delete the line entirely.
Save, reboot, done.

Check the file you saved actually saved to the correct place. Some systems will not let you edit hosts directly & will save a copy somewhere else, rather than back over your original file.

On Windows you should edit the file using Notepad run as Administrator.

Full instructions, from Liquidweb including DNS flush without reboot.

In Windows 10, your hosts’ file is located at: C:\Windows\System32\drivers\etc\hosts. You will need to edit the file with administrative privileges.

  1. Click the Windows button and type Notepad in the search bar.
  2. Right click on Notepad and then Run as Administrator.
  3. You’ll be asked, “Do you want to allow this app to make changes to your device?”. Choose Yes.
  4. In Notepad, choose File then Open
  5. Navigate to C:\Windows\System32\drivers\etc\hosts or click the address bar at the top and paste in the path and choose Enter. If you don’t readily see the host file in the /etc directory then select All files from the File name: drop-down list, then click on the hosts file.
  6. Add the appropriate IP and hostname at the end of your hosts’ file, select save and close the file.
  7. Finally, you will want to flush your DNS cache for your computer to recognize changes to the file. Click the Windows button and search command prompt.
  8. Right-click on command prompt and then select Run as Administrator.
  9. You’ll be asked, “Do you want to allow this app to make changes to your device?”. Choose Yes.
  10. Type the following command in the terminal and press Enter ipconfig /flushdns
6
  • I already done,everything you've said, but still the same issue. I still can't access the sites that I blocked before.
    – Rai Sobere
    Nov 27, 2019 at 9:23
  • Then you missed a step or did something wrong. There's only one hosts file… or should be. Check my 2nd paragraph.
    – Tetsujin
    Nov 27, 2019 at 9:31
  • Here's my hosts file screencast.com/t/wKWSe2dTD I already deleted everything. Files was saved in this directory C:\Windows\System32\drivers\etc also done the ipconfig /flushdns
    – Rai Sobere
    Nov 27, 2019 at 9:39
  • Did you make sure to flush the DNS cache? That's an important step. As stated above, make sure you do this in a command prompt that's been run as administrator.
    – NiallUK
    Nov 27, 2019 at 9:48
  • Yes, I've done every step, but still same issue.
    – Rai Sobere
    Nov 28, 2019 at 3:39
0

For anyone else, I want to note I did have them blocked still after having them removed from the file, but restarting firefox solved it then. It wasn't necessary to reboot the whole computer.

1
  • 1
    As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
    – Community Bot
    Mar 29, 2023 at 18:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .