Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Many frequently Asked Questions (and their answers) can be found at our Discourse site. Here are some items that have been asked (and answered) earlier on GitHub.
- Can I blacklist wildcard domains?
- Some sites are detecting ad-blocker
- Windows thinks there is no internet connection, but there is one.
- The Admin page stats take a long time to load (or times out)
- FireFox displays 'Unable to connect' instead of blocking the ad
- Can I redirect a domain to a different domain?
This has been implemented as a native feature. You can use the web interface (blacklist page), or the command
pihole -wild <domain to block>
This is a pesky one, and not really something that can be changed in pi-hole to get around.
However, you can check this github project for a pretty nifty workaround. Note, this solution requires greasemonkey/tampermonkey and an adblocker extension like uBlock origin.
Another option is to import a preloaded cookie using this method discussed on reddit.
See this article for a detailed explanation.
In the recent releases of some of the adlists the
www.msftncsi.com is blacklisted (Update:06/09/16 - this does not appear to be the case as of now) . Windows uses this domain to determine its network connectivity. Even though this does not affect the actual internet connection, it can be helpful to fix this in order to allow Windows to see this aswell.
You can either whitelist this domain using:
pihole -w www.msftncsi.com or follow the instructions here to customise the adlists.
There is also a useful registry setting on this microsoft page you can try to disable the check all together.
The stats can take a little while to process, and this is just because it's being run on a low-power device! If you have something running on the pi that uses a lot of processing power, the stat calculations could take longer than usual. To fix the stats from timing out, edit
max_execution_time and restart the
Certain ad networks use iFrames in order to display their ads. Depending on your adlist selection the pi-hole can block these ads, however in FireFox there is an error displayed (instead of a whitespace). This can make it look like something broke. To fix this you can use a FireFox extension called uBlock, which can be used to hide those elements. You can find this extension on the uBlock github page
If you want to redirect traffic from
www.differentdomain.com that is possible. There are a few things you need to do to get this working.
- First you need to create 2 files using the
sudo touch /etc/dnsmasq.d/customRedirect.conf sudo touch /etc/customRedirect.list
/etc/dnsmasq.d/customRedirect.confyou'll need to ad the following reference (using nano for example) to the other file:
- Next, you can put the actual redirect in
/etc/customRedirect.list, in this example these 2 lines:
www.exampledomain1.com www.differentdomain.com exampledomain1.com differentdomain.com
- This would redirect exampledomain1.com to differentdomain.com. The actual markup is
domain/ip address-redirect-from-domain redirect-to-domain
- Please note, if the domain you are trying to redirect elsewhere is already in pi-hole's blacklist, it is going to be duplicated there, run
whitelist.sh <domain>so that it is ignored by pi-hole, and is instead picked up by