Better name resolution for CNAME records #401

Closed
opened 2025-12-29 01:28:17 +01:00 by adam · 2 comments
Owner

Originally created by @RealTirex on GitHub (Dec 27, 2022).

Feature request
I am using special domain for a all services of my company (mycompany.dev). Sometimes I want to assign custom DNS, apart from the names that are provided by headscale.
For example I have a namespaces like api for all nodes, which provided a internal api of my company. I want to add these nodes, so that they can be solved with api.mycompany.dev.
When I add them as A record the problem is not occured, but when I want add them as a CNAME record the problem is appear. As default providers like cloudflare resolve CNAME records as:

dig A api.mycompany.dev
;api.mycompany.dev.		IN	CNAME api1.api.mycompany.dev
;api.mycompany.dev.		IN	A           10.0.0.1

but headscale resolve these CNAME record only for CNAME queries and can not resolve any IP for A queries:

dig A api.mycompany.dev
;api.mycompany.dev.		IN	A <empty>

I think, headscale should resolve A queries in a similar way as a cloudflare, thanks.

Originally created by @RealTirex on GitHub (Dec 27, 2022). **Feature request** I am using special domain for a all services of my company (mycompany.dev). Sometimes I want to assign custom DNS, apart from the names that are provided by headscale. For example I have a namespaces like `api` for all nodes, which provided a internal api of my company. I want to add these nodes, so that they can be solved with api.mycompany.dev. When I add them as A record the problem is not occured, but when I want add them as a CNAME record the problem is appear. As default providers like cloudflare resolve CNAME records as: ``` dig A api.mycompany.dev ;api.mycompany.dev. IN CNAME api1.api.mycompany.dev ;api.mycompany.dev. IN A 10.0.0.1 ``` but headscale resolve these CNAME record only for CNAME queries and can not resolve any IP for A queries: ``` dig A api.mycompany.dev ;api.mycompany.dev. IN A <empty> ``` I think, headscale should resolve A queries in a similar way as a cloudflare, thanks.
adam added the enhancement label 2025-12-29 01:28:17 +01:00
adam closed this issue 2025-12-29 01:28:17 +01:00
Author
Owner

@christian-heusel commented on GitHub (Jan 20, 2023):

Where did you add the CNAME record? Did you add it via the dns guide?

If so see that currently CNAME records are not supported: https://github.com/juanfont/headscale/blob/main/docs/dns-records.md#limitations, which is a limitation on the Tailscale side...

@christian-heusel commented on GitHub (Jan 20, 2023): Where did you add the CNAME record? Did you add it via the [dns guide]? If so see that currently CNAME records are not supported: https://github.com/juanfont/headscale/blob/main/docs/dns-records.md#limitations, which is a limitation on the Tailscale side... [dns guide]: https://github.com/juanfont/headscale/blob/main/docs/dns-records.md
Author
Owner

@RealTirex commented on GitHub (Jan 20, 2023):

@christian-heusel I added CNAME records for the third-party DNS server provider, cloudflare

@RealTirex commented on GitHub (Jan 20, 2023): @christian-heusel I added CNAME records for the third-party DNS server provider, cloudflare
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#401