AdGuard Home: DNS IPv4 Rewrite (Discard AAAA) for CNAME Domains
AdGuard Home is a network-wide ad blocker that protects all devices on your home network, without the need for installing any apps or extensions on each device.
The Problem: CNAME and AAAA Records
When a domain uses a CNAME record to point to another domain, and that domain has an AAAA record for IPv6 connectivity, it can cause issues for some devices and applications that only support IPv4. This is because the AAAA record is returned in the DNS response, even if the original query was for an IPv4 address.
The Solution: DNS IPv4 Rewrite
AdGuard Home provides a solution to this problem through its DNS IPv4 Rewrite feature. This feature allows you to specify a list of domains that should have their AAAA records discarded and replaced with an IPv4 address. This ensures that only IPv4 addresses are returned in the DNS response, preventing any issues with IPv6 connectivity.
Configuring DNS IPv4 Rewrite
To configure DNS IPv4 Rewrite in AdGuard Home, follow these steps:
- Open the AdGuard Home web interface.
- Navigate to the
DNStab. - Scroll down to the
IPv4 Rewritesection. - Click the
Add Rulebutton. - In the
Domainfield, enter the domain that you want to rewrite. This can be a single domain, or a wildcard domain using the\*character. - In the
IPfield, enter the IPv4 address that you want to use as the replacement for the AAAA record. - Click the
Savebutton to apply the rule.
Example: Rewriting CNAME Domains
Let's say you want to rewrite the AAAA records for the domain aclweb.org, which has a CNAME record pointing to acl-org.github.io. To do this, you would add the following rule:
Domain: aclweb.org
IP: 185.199.111.153
This will discard the AAAA record for aclweb.org and replace it with the IPv4 address 185.199.111.153.
AdGuard Home's DNS IPv4 Rewrite feature is a powerful tool for resolving issues with CNAME and AAAA records. By discarding AAAA records and replacing them with IPv4 addresses, you can ensure that all devices and applications on your home network can connect to the domains you specify, without any issues related to IPv6 connectivity.