Nothing is wrong with the resolver itself when a direct query to pfSense succeeds. The failure comes from two separate mistakes that frequently appear together: the client's resolver list contains public DNS servers that have never heard of your private host overrides, and pfSense is returning two addresses for one hostname, one of which points at the firewall instead of the reverse proxy. Fix the client's resolver list, remove the duplicate record, and then prove the proxy works independently of DNS.
Reading the evidence correctly
Two lookup results usually tell the whole story. A plain dig router.thearknet.me on a modern Linux client does not go to your router at all: it goes to the local systemd-resolved stub at 127.0.0.53, which forwards to whatever servers are configured on the active network link. If the answer carries status: NXDOMAIN and an SOA record naming a Cloudflare nameserver, a public resolver answered the query, not pfSense. That server cannot know about records that exist only inside pfSense's DNS Resolver, so NXDOMAIN is the correct answer from its point of view.
By contrast, dig @192.168.1.1 router.thearknet.me reaches pfSense directly and returns NOERROR with the authoritative flag set — but with two A answers where you expected one. Both symptoms are configuration problems, not resolver faults.
Why a mixed resolver list breaks private zones
This setup is a form of split-horizon DNS: router.thearknet.me exists in the public zone, but your chosen subdomain records exist only in the local view served by pfSense's unbound instance. The trap is that systemd-resolved treats all DNS servers configured on the same link as equivalent sources for the same zones. Listing pfSense first does not create a priority; it creates a pool. A given lookup may be sent to any server in that pool, sometimes several in parallel, and the first reply wins.
Worse, negative answers are cached. One NXDOMAIN from a public resolver can mask later correct answers from pfSense for the length of the negative TTL, which makes the problem look intermittent and drives people toward pointless resolver rebuilds.
Correcting the client's resolver configuration
Remove the public resolvers from the active connection so pfSense is the only server in that lookup scope. You can keep DHCP for addressing while stopping the interface from pulling foreign DNS servers:
nmcli connection modify "Wired connection 1" ipv4.ignore-auto-dns yes ipv4.dns 192.168.1.1
nmcli connection up "Wired connection 1"
sudo resolvectl flush-caches
resolvectl status
Confirm that the active link shows only 192.168.1.1 under its DNS entries, then retest with plain dig router.thearknet.me. Do not treat public resolvers as harmless backups for a zone that only exists locally — they are not interchangeable, and a "backup" that answers NXDOMAIN is actively harmful here.
Removing the duplicate address
Unbound can legitimately publish multiple A records for one hostname, so somewhere a second source is contributing 192.168.1.1. Check, in order:
- Host Overrides in Services > DNS Resolver — a duplicate or leftover entry for the same host.
- System > General Setup — if the firewall's own hostname shares your domain, pfSense publishes an address for itself.
- DHCP Registration and static mappings — these inject records into resolver answers when enabled.
Verify exactly what pfSense publishes after each change:
dig @192.168.1.1 router.thearknet.me A +short
dig @192.168.1.1 reverseproxy.thearknet.me A +short
For a reverse-proxy design, each name should return only 192.168.1.2. The extra .1 explains the reported 404s neatly: a client that picks that address lands on the firewall's own web server, which responds with a 404 for an unknown host. DNS supplies the proxy's IP; the backend ports 80 and 81 belong in the nginx proxy-host configuration, never in DNS.
Proving the proxy works without touching DNS
Decouple the test from the resolver using curl's --resolve option, which connects to a chosen IP while preserving the URL hostname for TLS/SNI and the Host header:
curl -v --resolve router.thearknet.me:443:192.168.1.2 https://router.thearknet.me/
curl -v --resolve reverseproxy.thearknet.me:443:192.168.1.2 https://reverseproxy.thearknet.me/
Certificate validation stays enabled, so a successful response proves both the nginx routing and the Let's Encrypt certificate. Distinguish the two failure classes clearly: curl: (6) means resolution failed before any HTTP exchange, while an HTTP 404 means a web server was reached but served the wrong virtual host or upstream — a purely nginx-side problem.
Preventing a repeat
- Hand out exactly one DNS server via DHCP — pfSense itself — so clients cannot silently acquire a second scope.
- Keep a single source of truth for the private zone and document every Host Override.
- After any resolver edit, flush client caches (
resolvectl flush-caches) and verify withdig +shortagainst the server and through the stub. - Treat NXDOMAIN for internal names from a public resolver as a configuration smell, never as a resolver bug.
Frequently Asked Questions
Can I keep a public resolver listed after pfSense as a backup?
Not reliably. Servers on the same link are treated as equivalent, so the public server will sometimes answer first with NXDOMAIN, and that negative answer gets cached. If you want a fallback, put it in a separate configuration scope or accept that internal names will intermittently fail.
dig works on the command line but the browser still fails — why?
Check for stale negative cache entries (flush with resolvectl flush-caches) and for the browser's own DNS-over-HTTPS setting, which bypasses the system resolver entirely and sends names straight to a public provider that lacks your overrides.
Where else can a second A record hide besides Host Overrides?
The firewall's own hostname and domain in System > General Setup, DHCP Registration, DHCP static mappings, and the OpenVPN client registration option can all inject records. Query each name with dig +short against pfSense to see exactly what is published.
Should the backend ports 80 and 81 appear anywhere in DNS?
No. DNS returns IP addresses only. Port mapping belongs in the nginx proxy host, which selects the upstream based on the requested hostname.
Do forward mode or DNSSEC settings cause this failure?
No. The failure is about which server answers, not the resolution mode. DNSSEC and forwarding only matter if public lookups misbehave, which is a separate investigation.