How to make a custom blocked site

What you need to know:

If you try to open a site which is blocked by Pi-hole you will see the 404 site because this prevents from loading until the request times out.

The 404 site currently looks like this:

<html>
<head>
window.close();
</head>
<body>
</body>
</html>

If you haven’t disabled JS the window will close.

How to:

You can simply change the index.html which is located at /var/www/html/pihole/ (if you didn’t changed it).

So you could just change it to:

<html>
<head>
</head>
<body>
<p>This site is blocked.<p>
</body>
</html>

If you want you can now build your custom site but if you don’t have the time/knowledge you can use the Pi-hole Block Page115 by WaLLy3K.

If you want to use PHP you need to change in the (/etc/lighttpd/) lighttpd.conf the server.error-handler-404 to “pihole/index.php”.

Important:

If you use PHP you have to change the server.error-handler-404 again everytime after you updated Pi-hole because the update overrides it.

 

 

https://discourse.pi-hole.net/t/how-to-make-a-custom-blocked-site/917

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s