Using Pi-hole with a public dns domain

I have been running Pi-hole with a “local” fully qualified DNS name:


I have since acquired a public dns name for customizing my families email messages vs.using Google or other services. I can configured the Pi-hole with my new .com domain but i was wondering what would be the impact to queries if my private network used the .com address vs. the .local?

If you just acquired a domain name (with or without email accounts), this wouldn’t work out of the box.

First, you’d have to find a way to make your domain name point to your IP address, which is the IP your ISP assigns to your router, and thus likely to change every other day, so you’d have to enlist the service of a dynamic DNS provider that takes care of this as well.

Then you’d have to decide whether you’d establish routes and port forwards to devices behind your router (like Pi-hole) to make them publicly available via your domain name, which in turn implies to setup your firewall correctly etc. etc.

For most home users, this is clearly not something they strive for.

And if you do that the wrong way, you might end up routing your DNS traffic through public internet, which is both slower and more insecure than keeping it local (though I am insinuating a major misconfiguration here).

If you just want to use your domain name on your local network for vanity reasons, you could add a respective .com entry to /etc/hosts.
But even then, you should be careful as to not blocking yourself from access to your mail, which -as I presume- is hosted by the vendor who provides your domain and uses the same domain name.

Thus, my strong advice would be to stick with .local (unless you are not only familiar but at ease with points I’ve raised).

Its just a name.
Make sure to change hostname for Pi-hole to reflect FQDN eg:

Create DNS records at your DNS registrar that needs to resolve for the public.
Create DNS records on Pi-hole that needs to resolve private @ home.

For mail, youd have to create an MX record that points to the server thats processing mail for your domain eg:

pi@noads:~ $ host -t mx mail is handled by 10


pi@noads:~ $ hostname -f

pi@noads:~ $ host $(hostname -I)
Using domain server:
Aliases: has address

pi@noads:~ $ host
Using domain server:

Host not found: 3(NXDOMAIN)

Thanks for the replies. My email server is being hosted on the cloud and already have my MX records on the public DNS side working great.

I have left the default pointing at the free landing page they provided. I will make the changes on the Pi-hole the FQDN as suggested and the internals should resolve locally and not leave the pi-hole. I am glad I have two weeks off of work for Christmas to work on this part of my home network project.

Well it’s done. I now have my real domain name up and running both internal and external. Thanks for the recommendations on this process.