How do I troubleshoot name resolution?

Resolving domain names into IP addresses is the core functionality of Pi-hole. If you set your devices to use Pi-hole as their DNS server and you cannot reach the Internet, here are the troubleshooting steps that should help.

Verify the DNS server is running

First and foremost, the DNS server needs to be active for Pi-hole to work. You can check the status of the server with these commands:

systemctl is-active dnsmasq
service status dnsmasq

If you're running FLLDNS, dnsmasq is replaced by it, so instead check.

service status pihole-FTL

If it's not running, you can try to start it like this:

systemctl start dnsmasq

or

service pihole-FTL start

but if it's not working, it probably won't start up as something else is probably wrong with your install.

dnsmasq's and FTLDNS' config files

dnsmasq and FTLDNS use a config file when starting up. On a vanilla Pi-hole installation, this is /etc/dnsmasq.d/01-pihole.conf. There may also be several other files in this directory depending on your installation.

If /etc/dnsmasq.d/01-pihole.conf does not exist, that would be the main cause for the server to not work properly.

The black hole list

Pi-hole is configured to use a list of domains that exist in a separate file (/etc/pihole/gravity.list). If this file is malformed or not in HOSTS format, then you will not be able to block ad domains.

Configure devices to use the Pi-hole

If the services are running and ads are still not blocked, you should first verify that your device(s) are using Pi-hole as their DNS server.

1 Like

Verify config files: If you also installed DNScrypt, as explained in this topic (the instructions are a little outdated, I used version 1.8.1, not version 1.7.0 as mentioned in the instructions), you will NOT have server settings in /etc/dnsmasq.d/01-pihole.conf and /etc/pihole/setupVars.conf. The instructions to install DNScrypt require you to comment out these settings. The comment lines ('#server=' and '#piholeDNS=') are removed, as you upgrade pi-hole.