Skip to content

Commit

Permalink
Merge pull request #263 from AdguardTeam/AGM-2265-structured-dns-errors
Browse files Browse the repository at this point in the history
Create an article about SDE
  • Loading branch information
sonya-orlova authored Nov 15, 2024
2 parents 747c914 + 7aea131 commit 856a4f6
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/miscellaneous/acknowledgements.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Credits and Acknowledgements
sidebar_position: 5
sidebar_position: 3
---

Our dev team would like to thank the developers of the third-party software we use in AdGuard DNS, our great beta testers and other engaged users, whose help in finding and eliminating all the bugs, translating AdGuard DNS, and moderating our communities is priceless.
Expand Down
6 changes: 5 additions & 1 deletion docs/miscellaneous/create-dns-stamp.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# How to create your own DNS stamp for Secure DNS
---
title: How to create your own DNS stamp for Secure DNS

sidebar_position: 4
---

This guide will show you how to create your own DNS stamp for Secure DNS. Secure DNS is a service that enhances your internet security and privacy by encrypting your DNS queries. This prevents your queries from being intercepted or manipulated by malicious actors.

Expand Down
57 changes: 57 additions & 0 deletions docs/miscellaneous/structured-dns-errors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
title: Structured DNS Errors (SDE)
sidebar_position: 5
---

With the release of AdGuard DNS v2.10, AdGuard has become the first public DNS resolver to implement support for [*Structured DNS Errors* (SDE)](https://datatracker.ietf.org/doc/draft-ietf-dnsop-structured-dns-error/09/), an update to [RFC 8914](https://datatracker.ietf.org/doc/rfc8914/). This feature allows DNS servers to provide detailed information about blocked websites directly in the DNS response, rather than relying on generic browser messages. In this article, we'll explain what *Structured DNS Errors* are and how they work.

## What Structured DNS Errors are

When a request to an advertising or tracking domain is blocked, the user may see blank spaces on a website or may not even notice that DNS filtering has occurred. However, if an entire website is blocked at the DNS level, the user will be completely unable to access the page. When trying to access a blocked website, the user may see a generic "This site can't be reached" error displayed by the browser.

!["This site can't be reached" error](https://cdn.adtidy.org/content/blog/dns/dns_error.png)

Such errors don't explain what happened and why. This leaves users confused about why a website is inaccessible, often leading them to assume that their Internet connection or DNS resolver is broken.

To clarify this, DNS servers could redirect users to their own page with an explanation. However, HTTPS websites (which are the majority of websites) would require a separate certificate.

![Certificate error](https://cdn.adtidy.org/content/blog/dns/certificate_error.png?1)

There’s a simpler solution: [Structured DNS Errors (SDE)](https://datatracker.ietf.org/doc/draft-ietf-dnsop-structured-dns-error/09/). The concept of SDE builds on the foundation of [*Extended DNS Errors* (RFC 8914)](https://datatracker.ietf.org/doc/rfc8914/), which introduced the ability to include additional error information in DNS responses. The SDE draft takes this a step further by using [I-JSON](https://www.rfc-editor.org/rfc/rfc7493) (a restricted profile of JSON) to format the information in a way that browsers and client applications can easily parse.

The SDE data is included in the `EXTRA-TEXT` field of the DNS response. It contains:

- `j` (justification): Reason for blocking
- `c` (contact): Contact information for inquiries if the page was blocked by mistake
- `o` (organization): Organization responsible for DNS filtering in this case (optional)
- `s` (suberror): The suberror code for this particular DNS filtering (optional)

Such a system enhances transparency between DNS services and users.

### What is required to implement Structured DNS Errors

Although AdGuard DNS has implemented support for Structured DNS Errors, browsers currently do not natively support parsing and displaying SDE data. For users to see detailed explanations in their browsers when a website is blocked, browser developers need to adopt and support the SDE draft specification.

### AdGuard DNS demo extension for SDE

To showcase how Structured DNS Errors work, AdGuard DNS has developed a demo browser extension that shows how *Structured DNS Errors* could work if browsers supported them. If you try to visit a website blocked by AdGuard DNS with this extension enabled, you will see a detailed explanation page with the information provided via SDE, such as the reason for blocking, contact details, and the organization responsible.

![Explanation page](https://cdn.adtidy.org/blog/new/jlkdbaccess_blocked.png)

You can install the extension from the [Chrome Web Store](https://chromewebstore.google.com/detail/oeinmjfnchfhaabhchfjkbdpmgeageen) or from [GitHub](https://github.com/AdguardTeam/dns-sde-extension/).

If you want to see what it looks like at the DNS level, you can use the `dig` command and look for `EDE` in the output.

```text
% dig @94.140.14.14 'ad.doubleclick.net' A IN +ednsopt=15:0000
...
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
; EDE: 17 (Filtered): ({"j":"Filtered by AdGuard DNS","o":"AdGuard DNS","c":["mailto:[email protected]"]})
;; QUESTION SECTION:
;ad.doubleclick.net. IN A
...
```
2 changes: 1 addition & 1 deletion docs/miscellaneous/take-screenshot.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: 'How to take a screenshot'
sidebar_position: 4
sidebar_position: 2
---

Screenshot is a capture of your computer’s or mobile device’s screen, which can be obtained by using standard tools or a special program/app.
Expand Down
2 changes: 1 addition & 1 deletion docs/miscellaneous/update-kb.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: 'Updating the Knowledge Base'
sidebar_position: 3
sidebar_position: 1
---

The goal of this Knowledge Base is to provide everyone with the most up-to-date information on all kinds of AdGuard DNS-related topics. But things constantly change, and sometimes an article doesn't reflect the current state of things anymore — there are simply not so many of us to keep an eye on every single bit of information and update it accordingly when new versions are released.
Expand Down
4 changes: 2 additions & 2 deletions docs/public-dns/solving-problems/_category_.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"position": 1,
"position": 2,
"label": "Solving problems",
"collapsible": true,
"collapsed": true
}
}

0 comments on commit 856a4f6

Please sign in to comment.