ownDynDNS icon indicating copy to clipboard operation
ownDynDNS copied to clipboard

Third Level Domains not correctly stripped for netcup API

Open dadosch opened this issue 2 years ago • 2 comments

Currently, a third level domain like third.level.example.com gets stripped to level.example.com by getHostname().

Correct would be of course example.com, otherwise the API responds with 5029, "Can not get DNS records for zone. Domain not found."

dadosch avatar Mar 19 '22 22:03 dadosch

Am I correct in the following assumptions?

  1. Third level domains like third.level.example.com should still be added to the example.com zone.
  2. Netcup handles this by using "third.level" as the host for a record.
  3. This script needs to strip the last two or three domain levels, depending on the TLD.

In this case I propose using a separate (optional) parameter for the requests. That way you could manually assign the parent domain and host parts of the address. So instead of using "&domain=third.level.example.com" we could use "&host=third.level&domain=example.com". Might need to use another parameter name for domain, but this should work

NiiWiiCamo avatar Aug 22 '23 14:08 NiiWiiCamo

Edit: I know it is probably too late, but I added support in my fork, PR with several additions is opened. For anyone interested in the future.

NiiWiiCamo avatar Aug 22 '23 20:08 NiiWiiCamo