<div dir="ltr">Small correction to my example in the previous email:<br><br>I mistakenly used `/<a href="http://example.com/#`">example.com/#`</a> as the example. That returns a null IP address, not NXDOMAIN.<br><br>What I actually meant was a blocking rule like:<br><br>/<a href="http://example.com/">example.com/</a><br><br>in the dnsmasq Forward section, which returns NXDOMAIN for all queries.<br><br>My question is specifically about these locally generated NXDOMAIN responses: since they don't contain an SOA record or negative TTL, the client can't negatively cache the response and may keep querying dnsmasq repeatedly for the same domain.<br><br>Another thing is that I don't just want to block A and AAAA queries. Nowadays, HTTPS records are also used, and for some domains they can contain IPv4 and IPv6 address hints. If HTTPS records for blocked domains are not blocked, some clients may use the IPs received from those hints and still successfully connect to those domains.<br><br>The Chrome team has also said they have plans to add support for IPv4 and IPv6 hints in their browser.<br><br>`/<a href="http://example.com/`">example.com/`</a> blocks everything with NXDOMAIN, so it is ideal for me to block all three: A, AAAA, and HTTPS. However, dnsmasq not providing an SOA/negative TTL to the client is somewhat of an issue.<br><br>So, please let me know if there are any plans to implement this kind of fake SOA/negative TTL support in dnsmasq.<br><br>Sorry for making the mistake in my initial email.<br><br>Thanks,<br><br>Indronil.<br></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Thu, Sep 17, 2026 at 3:19 PM Indronil Anik <<a href="mailto:indronilanik@gmail.com">indronilanik@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div dir="auto">Hello everyone,</div><div dir="auto"><br></div><div dir="auto">I have a question about locally generated NXDOMAIN responses in dnsmasq.</div><div dir="auto"><br></div><div dir="auto">I came across this older discussion from 2018:</div><div dir="auto"><br></div><div dir="auto"><a href="https://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2018q1/012042.html" target="_blank">https://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2018q1/012042.html</a></div><div dir="auto"><br></div><div dir="auto">The answer mentioned that providing TTL information for locally generated NXDOMAIN responses would require dnsmasq to include an SOA record.</div><div dir="auto"><br></div><div dir="auto">It's been 8 years since that email, and I was wondering if anything has changed since then?</div><div dir="auto"><br></div><div dir="auto">For example, currently with a blocking rule like:</div><div dir="auto"><br></div><div dir="auto">/<a href="http://example.com/#" target="_blank">example.com/#</a></div><div dir="auto"><br></div><div dir="auto">dnsmasq returns NXDOMAIN, but there is no SOA record or negative TTL in the response. Because of that, the client doesn't have anything to use for negative caching, and some stubborn clients or apps keep querying dnsmasq again and again for the same domain, which fills the log with a lot of clutter.</div><div dir="auto"><br></div><div dir="auto">Would you please consider adding SOA records with TTL as a feature?</div><div dir="auto"><br></div><div dir="auto">For context, I'm using dnsmasq-full on OpenWrt in my router.</div><div dir="auto"><br></div><div dir="auto">Thanks,</div><div dir="auto"><br></div><div dir="auto">Indronil.</div></div>
</blockquote></div>