Utilize Extended DNS Errors (EDE) to report client when a query is blocked/filtered

Author: emlimapCreated Nov 3, 2020Updated Sep 25, 2026
Labelsfeature requestP3: MediumPriority: P3

Came across this post https://blog.cloudflare.com/unwrap-the-servfail/ which talks about new IETF proposal which provides more information to client on errors encountered by DNS resolver when processing a query.

Link to the proposal https://datatracker.ietf.org/doc/rfc8914/

We could leverage this to report the client when a querying domain is blocked. This way you wouldn't have to access web UI to confirm if a domain was blocked or not. Especially it isn't obvious when used with returning NXDOMAIN for blocked domains whether this was return by AGH or upstream DNS server.

I can see some error codes we could use for this

4.16.  Extended DNS Error Code 15 - Blocked

   The server is unable to respond to the request because the domain is
   on a blocklist due to an internal security policy imposed by the
   operator of the server resolving or forwarding the query.

....

4.18.  Extended DNS Error Code 17 - Filtered

   The server is unable to respond to the request because the domain is
   on a blocklist as requested by the client.  Functionally, this
   amounts to "you requested that we filter domains like this one."

Maybe blocked code for domains blocked by a list and filtered for domains blocked by Security and Family service.

And there is also a code to cover cases where an answer was forged. I guess this would cover cases where we return NULL IP or 127.0.0.1 or an DNS rewrite


4.5.  Extended DNS Error Code 4 - Forged Answer

   For policy reasons (legal obligation or malware filtering, for
   instance), an answer was forged.  Note that this should be used when
   an answer is still provided, not when failure codes are returned
   instead.  See Blocked (15), Censored (16), and Filtered (17) for use
   when returning other response codes.