Hi, I am trying to use the DDNS client for a subdomain on my site, however when I try and use a subdomain I get this error:
100552 WARN : Could not detect ‘zone id’ for domain.tld: subdomain.example.com
However, when I use the top level domain example.com everything works fine, the zoneid is found.
I ran into this same error message while using OpenWRT DDNS (specifically
ddns-scripts_Cloudflare.com-v4). Not sure if this is your case.
The solution I found in my case was to specify the record to update (in
Domain field) in the following format:
I hope this is helpful.
Note: There is a secondary issue with the OpenWRT DDNS scripts: if the
Lookup Hostname is “orange-clouded” (i.e DNS proxied), then when the scripts query the record, they will get the proxied IP address (this will make the DDNS client think that it needs to update the address, when it likely does not need to).
Try this one if it helps. Its a python code and u can compile it urself if u like and make windows or macos binary. Otherwise, use the automated script in a linux machine.
DDNS on Cloudflare only works in linux distributions with systemd service deamon.
hi (@Dreamworkz-92) I just took a look at the difference in the api calls between the python script you’ve posted and the ddns-scripts_Cloudflare.com-v4 script I wondered what magic the python might be doing.
Turns out they’re more-or-less the same of course.
Python script simply compares Cloudflare API response for A record against local dynamic IP from ISP. IF there’s mismatch then local IP is put into A record
openWRT script first of all compares (sub)domain ip from global dns against dynamic IP If there’s a mismatch then it does exactly what the python script does (it won’t put the record in second step unless it really has changed).
So there are not increased writes to Cloudflare API and your dns records, nor are there any increased reads - that all depends on your timers. The only difference is the comparison of the local ip to the global dns to invoke the Cloudflare api calls and this is because openWRT DDNS has different scripts for different providers but a single method to check if it’s needed.
I would say to others who might read this that the openWRT route is probably less resource intensive on your router rather than running python and having all the dependencies installed and managed - compared to just an extra nslookup every time the openWRT ddns script runs to check the ip of the (sub)domain on the internet.
(thanks @jorgemsgomes for the solution to the original issue, I found it very useful)
I created another method to update the DNS without comparison since the Public IP of a location is same despite which device update it. This is more of an simplified form of Cloudflare API using Cloudflare Workers. Just a simple api call in a infinite loop with interval is needed for it to work. All code is open source and published in github.
Test site: https://ddnslab.tech
Have a look at this solution for hosting your own DDNS service directly via CF-API v4.