Hi @qrkourier
Thank you once again for a quick and detailed response.
I have been trying in vain to get a solution working. Below is my actual setup, but using hypothetical data.
-
I own example.com
which is registered with Squarespace
-
I'm using the Squarespace DNS service for MX and other "apps" (A records), like app.example.com
, which need to stay intact
-
I have got a self-hosted zrok+Caddy
on a VPS with IP 1.2.3.4
- I configured Caddy to use the duckdns DNS plugin
-
I would like to use the subdomain zrok.example.com
as my DNS zone for zrok
-
I have registered my-zrok.duckdns.org
and pointed it to 1.2.3.4
- I'm not able to create the zone
zrok.example.com
here
-
I can drill abc.my-zrok.duckdns.org
and it yields 1.2.3.4
, so it is correctly supporting wildcard DNS as hoped for.
The piece of the puzzle that I'm missing here to configure Squarespace such that abc123.zrok.example.com
can become abc123.my-zrok.duckdns.org
and resolve to 1.2.3.4
where Caddy can take over.
I think your most recent subdomain delegation solution requires that I create a zone zrok.example.com
("In your wildcard DNS provider, create the zone zrok.example.com
and note the NS
records for the new zone."), but DuckDNS doesn't allow for that. Subdomains need to be under the duckdns.org
apex.
I tried adding a CNAME record in Squarespace for zrok --> my-zrok.duckdns.org
, but this doesn't delegate for sub-sub-domains, like abc123.zrok.example.com
and Squarespace doesn't allow for wildcarding...
Unless I've misunderstood, I think the combination of Squarespace and DuckDNS isn't going to work in this scenario. I might need to switch to another DNS service provider, like dynu.com.
Update 1
I have looked at deSEC as a DNS provider - it appears to be excellent (supports wildcard record names, API, zonefile download, bulk atomic record upload) and there is a caddy-dns plugin. I'm busy testing it with Caddy at the moment (rebuilding with xcaddy
takes a long time...). I'm considering using it for my entire domain.
Update 2
I realised that I would be able to create a subdomain of my apex domain in deSEC, i.e. zrok.example.com
, which is something I couldn't do with DuckDNS. I could therefore do as @qrkourier had suggested which was to add NS records to my apex domain DNS for zrok
which point to the deSEC nameservers.
And I can confirm that this now works! I can see the caddy-dns deSEC plugin creating TXT records which allows the ACME challenge to succeed, so TLS certificates can successfully be created for *.zrok.example.com
. And this allows me to create arbitrary zrok shares without having to manually update the Caddyfile. And I can leave all the other DNS records untouched in Squarespace DNS.
@qrkourier