How to Configure Network-Wide Pi-hole with Client Exceptions
Here is a guide on setting up your Pi-hole to block ads for the entire network, while excluding specific clients using the Group Management features.
Prerequisites
-
A functional Pi-hole installation with a static IP address (e.g., 192.168.1.100).
-
Access to your router’s DHCP server settings.
Step 1: Configure Your Router for Network-Wide DNS
This forces all devices on your network to use the Pi-hole for DNS resolution.
-
Log into your router’s admin panel.
-
Navigate to the DHCP Server or LAN settings.
-
Set the Primary DNS Server to your Pi-hole’s static IP address (e.g.,
102.168.1.100). -
Leave the Secondary DNS Server blank or set it to
0.0.0.0to ensure all queries go to the Pi-hole. -
Save your settings and reboot the router.
-
Optional but recommended: Ensure your computer and other clients receive the new DNS setting by restarting them or running
ipconfig /renewon Windows.
How to Configure Pi-hole for Network-Wide Ad Blocking with Client Exceptions
This guide assumes your Pi-hole is installed and accessible via its web interface. The final step of configuring your router is necessary for this to work network-wide.
Prerequisites
-
Your Pi-hole has a static IP address (e.g.,
192.168.1.100). -
You know how to access your router’s DHCP settings.
Step 1: Configure Your Router for Network-Wide Blocking
To ensure all devices on your network use the Pi-hole, you must tell your router to provide the Pi-hole’s IP address as the only DNS server.
-
Access your Router settings (usually via
192.168.1.1or similar IP address in a web browser). -
Navigate to Network > DHCP Server (or similar LAN settings).
-
Set the Primary DNS Server field to your Pi-hole’s IP address (e.g.,
192.168.1.100). -
Leave the Secondary DNS Server field blank (or set it to
0.0.0.0). -
Save settings and reboot your router and client devices to pick up the new DNS settings.
Step 2: Create a Group for Excluded Clients
You need a dedicated group for clients you do not want to block ads for.
-
In the Pi-hole admin interface, go to Group Management > Groups.
-
Under Add a new group, enter a descriptive name like
no_adsand a comment (e.g., “Clients that bypass ad blocking”). -
Ensure Status is
Enabledand click Add.
Step 3: Exclude the New Group from Ad Lists
Next, you must ensure your active ad lists are not assigned to the no_ads group.
-
Go to Group Management > Adlists.
-
For every ad list entry:
-
Click the Group assignment dropdown menu or icon.
-
- Ensure only the
Defaultgroup is checked. - Ensure the
no_adsgroup is unchecked.
- Ensure only the
-
Step 4: Assign Specific Clients to the Excluded Group
Finally, move your specific clients (like mypc and home) from the Default group to the no_ads group.
-
Go to Group Management > Clients. The clients should appear here after they start using the Pi-hole.
-
For the specific client IP addresses (e.g.,
192.168.1.70and192.168.1.71):-
Click the Edit button (pencil icon) or select the group assignment dropdown.
-
Uncheck the
Defaultgroup. -
Check the
no_adsgroup.
-
-
Click Save for each client entry.
You have now successfully configured network-wide ad blocking with specific device exceptions!