[GH-ISSUE #5506] Custom domain won't verify if custom domain is a CNAME to the proxy domain that is also a CNAME (Dynamic DNS) #11612

Open
opened 2026-08-05 01:30:10 -04:00 by saavagebueno · 0 comments
Owner

Originally created by @heymoe on GitHub (Mar 4, 2026).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/5506

Describe the problem

Unable to verify a custom domain if the proxy domain is a CNAME to another DNS name (dynamic DNS)

mycustomdomain.com -> proxy.domain.com -> dynamic-dns.com -> IP: 1.2.3.4

To Reproduce

My ISP doesn't provide a static IP so I use a dynamic DNS service so I can reference: myhomeip.dynamic-dns.com to know what my current home IP is. When setting up Netbird (self-hosted) at home I used a personal domain for Netbird's dashboard / main URL: netbird.mydomain.com and proxy.mydomain.com for the proxy DNS name / URL. Both of these are CNAMEs pointing to myhomeip.dynamic-dns.com

Netbird has been working fine with this setup and I'm able to added proxy service using myapp.proxy.mydomain.com without a problem.

I then went to add a custom domain myservices.com and followed the steps in setting up the wildcard *.myservices.com and pointed it to proxy.mydomain.com. I verified that if I did an lookup of foo.myservices.com that it would resolve to my current public IP. I then clicked Verify Domain which failed.

Logs:

netbird-server  | 2026-03-04T21:34:44.397Z INFO [domainID: xxxxx, accountID: xxxx] management/internals/modules/reverseproxy/domain/manager/manager.go:177: starting domain validation
netbird-server  | 2026-03-04T21:34:44.397Z INFO [accountID: xxxx, domainID: xxxx, domain: myservices.com, targetCluster: proxy.mydomain.com] management/internals/modules/reverseproxy/domain/manager/manager.go:204: validating domain against target cluster
netbird-server  | 2026-03-04T21:34:44.402Z WARN [domain: myservices.com, cname: myhomeip.dynamic-dns.com, acceptList: [proxy.mydomain.com]] management/internals/modules/reverseproxy/domain/validator.go:86: domain CNAME does not match any accepted cluster
netbird-server  | 2026-03-04T21:34:44.402Z WARN [domainID: xxxxx, domain: myservices.com, targetCluster: proxy.mydomain.com, accountID: xxxx] management/internals/modules/reverseproxy/domain/manager/manager.go:227: domain validation failed - CNAME does not match target cluster

It looks like Netbird is making sure the custom domain resolves to the CNAME of the proxy (proxy.mydomain.com) but since the proxy domain is also a CNAME pointing to myhomeip.dynamic-dns.com, Netbird is seeing the final CNAME in the chain and that CNAME does not match the proxy domain name thus the verification fails.

Expected behavior

I get the reason for the verification but maybe check if the IP the custom domain resolves to is the same as the IP the proxy domain resolves to Or add and proxy.env option to add an additional domain to the trusted / accepted list Or some other alternative method that would also satisfy other scenarios like (https://github.com/netbirdio/netbird/issues/5379)

I was able to work around this issue by changing proxy.mydomain.com to an A record of my current IP after which Netbird verified the domain without a problem. After the verification I switch proxy.mydomain.com back to pointing my dynamic DNS CNAME and after restarting Netbird, it doesn't seem to re-verify the domain.

Even though I found a work around, it would be nice not having to temporarily make DNS changes to verify a custom domain.

Are you using NetBird Cloud?

Self-hosted

NetBird version

Management: v0.66.2
Dashboard: v2.33.0

Is any other VPN software installed?

Nope

Debug output

Will provide if needed.

Screenshots

Will provide if needed.

Additional context

Nothing to add at the moment.

Have you tried these troubleshooting steps?

  • Reviewed client troubleshooting (if applicable)
  • Checked for newer NetBird versions
  • Searched for similar issues on GitHub (including closed ones)
  • Restarted the NetBird client
  • Disabled other VPN software
  • Checked firewall settings
Originally created by @heymoe on GitHub (Mar 4, 2026). Original GitHub issue: https://github.com/netbirdio/netbird/issues/5506 **Describe the problem** Unable to verify a custom domain if the proxy domain is a CNAME to another DNS name (dynamic DNS) `mycustomdomain.com -> proxy.domain.com -> dynamic-dns.com -> IP: 1.2.3.4` **To Reproduce** My ISP doesn't provide a static IP so I use a dynamic DNS service so I can reference: `myhomeip.dynamic-dns.com` to know what my current home IP is. When setting up Netbird (self-hosted) at home I used a personal domain for Netbird's dashboard / main URL: `netbird.mydomain.com` and `proxy.mydomain.com` for the proxy DNS name / URL. Both of these are CNAMEs pointing to `myhomeip.dynamic-dns.com` Netbird has been working fine with this setup and I'm able to added proxy service using `myapp.proxy.mydomain.com` without a problem. I then went to add a custom domain `myservices.com` and followed the steps in setting up the wildcard `*.myservices.com` and pointed it to `proxy.mydomain.com`. I verified that if I did an lookup of `foo.myservices.com` that it would resolve to my current public IP. I then clicked Verify Domain which failed. Logs: ``` netbird-server | 2026-03-04T21:34:44.397Z INFO [domainID: xxxxx, accountID: xxxx] management/internals/modules/reverseproxy/domain/manager/manager.go:177: starting domain validation netbird-server | 2026-03-04T21:34:44.397Z INFO [accountID: xxxx, domainID: xxxx, domain: myservices.com, targetCluster: proxy.mydomain.com] management/internals/modules/reverseproxy/domain/manager/manager.go:204: validating domain against target cluster netbird-server | 2026-03-04T21:34:44.402Z WARN [domain: myservices.com, cname: myhomeip.dynamic-dns.com, acceptList: [proxy.mydomain.com]] management/internals/modules/reverseproxy/domain/validator.go:86: domain CNAME does not match any accepted cluster netbird-server | 2026-03-04T21:34:44.402Z WARN [domainID: xxxxx, domain: myservices.com, targetCluster: proxy.mydomain.com, accountID: xxxx] management/internals/modules/reverseproxy/domain/manager/manager.go:227: domain validation failed - CNAME does not match target cluster ``` It looks like Netbird is making sure the custom domain resolves to the CNAME of the proxy (`proxy.mydomain.com`) but since the proxy domain is also a CNAME pointing to myhomeip.dynamic-dns.com, Netbird is seeing the final CNAME in the chain and that CNAME does not match the proxy domain name thus the verification fails. **Expected behavior** I get the reason for the verification but maybe check if the IP the custom domain resolves to is the same as the IP the proxy domain resolves to Or add and proxy.env option to add an additional domain to the trusted / accepted list Or some other alternative method that would also satisfy other scenarios like (https://github.com/netbirdio/netbird/issues/5379) I was able to work around this issue by changing `proxy.mydomain.com` to an A record of my current IP after which Netbird verified the domain without a problem. After the verification I switch `proxy.mydomain.com` back to pointing my dynamic DNS CNAME and after restarting Netbird, it doesn't seem to re-verify the domain. Even though I found a work around, it would be nice not having to temporarily make DNS changes to verify a custom domain. **Are you using NetBird Cloud?** Self-hosted **NetBird version** Management: v0.66.2 Dashboard: v2.33.0 **Is any other VPN software installed?** Nope **Debug output** Will provide if needed. **Screenshots** Will provide if needed. **Additional context** Nothing to add at the moment. **Have you tried these troubleshooting steps?** - [x] Reviewed [client troubleshooting](https://docs.netbird.io/how-to/troubleshooting-client) (if applicable) - [x] Checked for newer NetBird versions - [x] Searched for similar issues on GitHub (including closed ones) - [x] Restarted the NetBird client - [x] Disabled other VPN software - [x] Checked firewall settings
saavagebueno added the triage-needed label 2026-08-05 01:30:10 -04:00
Sign in to join this conversation.
No Label triage-needed
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#11612