Create Blacklist html page?

wanted to know if it's possaible to create a simple HTML page whenever someone try to reach Blacklist sites?

I have added to the Blacklist (jsut to check) , I get the html that said - no internet connection (defualt browser page).
can I created my own html page that all blacklist sites will be direct to him ?
'this site is blocked ! connect administrator , bla bla lba'


Yes you can do this. But mind, that it will only work for http sites, not https.

You need to change your blocking mode to IP.

And modify the blocking page, which is located at var/www/html/pihole/

You might find more info using the forum's search function, e.g.

I read the post you show me
and also found this guide

but before I start - I want to understand why I can only block HTTP and not HTTPS ?
I mean - the blocking is according to the IP , no?
the IP could be https and also http - and I block the IP and not the name

I don't want to setup everything and it will not do what I want\need.

Thanks ,

That would depend on what you want to block.
Generally speaking, it won't work for well over 80% of websites world-wide (and that number is ever nearing the 100% mark, and may well be over 90% for websites in your respective country).

HTTPS connections provide authenticity of the server you are connecting to by crpytographic means, so you can be sure you are communicating to the server you intend to contact.
You'd have to break that encryption if you wanted to show an arbitrary page instead of actual web server content (which would include forging certificates for every site you want to block).

The continuing proliferation of HTTPS was one of the major reasons why Pi-hole has switched to NULL blocking (unspecified IP blocking) as default years ago.

Pi-hole is a filtering DNS forwarder - blocking occurs by domain exclusively.

so you can say it's vey much useless to block websites using th pi-hole in that way?

another related question
I found that I can download to th PI-HOLE a list of IPs to block facebook (for example)
which is a list of all facebook sites and "subsite"
if I will download it , when I will try to enter facebook - it will give the default error page "page not found" ? or the block custom page? or nothing ?

** I don't want to downlaod it , because I don't know how to disable it after :slight_smile:

Thanks ,

If that would really be a list of IPs, it won't work with Pi-hole, as Pi-hole is a filtering DNS forwarder - blocking occurs by domain exclusively.

If it is a list of domains in HOSTS format, than you can assign, enable and disable it via Group management | Adlists just like any other blocklist.

its a list like this

so it's good \ not good ?
also what will I see when someone try to enter? the block.html? or will return an error 404 page not found?

Thanks ,

I can't judge the quality of its content.
The format looks ok.

I cannot know that, since that would depend on your configuration.
Easiest way to find out: Give it a try.

I will build another PI with PI-hole and give it a try

thank you meanwhile...

It won't show me the blocking page
just "page not there 404 , no internet connection"

I thought I could explain people why I'm blocking , and only blocking :slight_smile:

I think if this option will be - it will be great ( if it possiable and doable)

It's not. You can not do this for https pages and that's where everything is heading.

it's also good to know that something can't be done :slight_smile:

Thank you