Block Specific Websites

Hi,
I am trying to block some specific websites with my pi-hole, namely YouTube, Facebook, and some others that distract me the most. However I have them added to my blacklist, but they are still freely accessible, aka not blocked. I am using my pc connected to my modem via Ethernet, and my Pi is also connected via Ethernet.


anyone know why and what I can do to solve this problem?

Thanks.

Your regex don't contain domains, but also the protocols and in one case the URL
Remove the http::// and the /wiki from the regex.


so like this?

cause it's not working

Blacklist add domain (check "wildcard"):
No http, https nor www!

youtube.com
youtu.be

For facebook:

facebook.com
facebook.net
facebook.**XX**

include even facebook.XX where XX is Your country (or countries to be blocked).
I.e .de .be .se .no .fi. ie ...

This is not an RegEx expression. Change the Type to "Backlist".

2 Likes

TY, missed that!


Okay, so I have done this, and it is successfully blocking Facebook, but Youtube still works fine. I also disabled the blocks on Facebook, but I still cannot access it, even minutes after

If You are running Windows You should try to clear DNS cache and refresh network settings:

Command-line (CMD):

IPCONFIG /RELEASE
IPCONFIG /FLUSHDNS
IPCONFIG /RENEW

Just to verify that DNS settings are properly updated.

The new screenshot shows all RegEx, but you selected Exact Blacklist. You need to change the type of those.


okay thank you I got it working with this, but it takes a while for Pi-Hole to start blocking it. Why is this and can it be fixed?

What do you mean?

I enable it, but I still have access to the website for a few minutes


Uploading: image.png(1)...
also I'm having a problem where I unblocked Facebook at least 20 minutes ago and it's still blocked by Pi-Hole

image
here is the screenshot of all of the facebook domains that I normally have blocked (since it won't load on the previous post)

This is normal, in case you have been visiting the site before - your local browser is caching the IP.

Please upload a debug log and post just the token URL that is generated after the log is uploaded by running the following command from the Pi-hole host terminal:

pihole -d

or do it through the Web interface:

Tools > Generate Debug Log

https://tricorder.pi-hole.net/3z16yiIA/ is my debug token. I find it weird, because Youtube and Facebook interact differently with th Pi-Hole. Youtube is blocked/unblocked pretty normally, but Facebook is pretty much permanently blocked

Maybe FB is still blocked even when your RegEx are disabled because you have this adlist enabled?

   
   5            1  0             https://raw.githubusercontent.com/crpietschmann/pi-hole-blocklist/main/social-media/blocklist-social  2022-05-23 09:29:43  2022-05-26 06:36:13                                                    
                                 -facebook.txt                                                                                                                                                                                     
   

oooooh ok that makes a lot more sense. Thank you