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.
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”.
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.