Skip to content

Conversation

rnavarro
Copy link
Collaborator

Resolves a bug where DirectAdmin provider attempted to create DNS records in non-existent zones for subdomain requests. For example, when managing host.subdomain.domain.com, the provider incorrectly tried to use zone subdomain.domain.com instead of the actual managed zone domain.com.

Key changes:

  • Add findManageableZone() with parent zone traversal algorithm
  • Add getDomainList() to retrieve available DirectAdmin domains
  • Add adjustRecordForZone() for proper subdomain record name handling
  • Update all CRUD operations to use detected manageable zones
  • Add comprehensive test coverage for zone detection scenarios
  • Add LIBDNS_DA_NON_ROOT_TEST_ZONE environment variable for testing

This fix enables proper ACME challenge handling for subdomains in Caddy server deployments, resolving "Domain does not belong to you" errors.

Resolves a bug where DirectAdmin provider attempted to create DNS
records in non-existent zones for subdomain requests. For example, when
managing host.subdomain.domain.com, the provider incorrectly tried to
use zone subdomain.domain.com instead of the actual managed zone domain.com.

Key changes:
- Add findManageableZone() with parent zone traversal algorithm
- Add getDomainList() to retrieve available DirectAdmin domains
- Add adjustRecordForZone() for proper subdomain record name handling
- Update all CRUD operations to use detected manageable zones
- Add comprehensive test coverage for zone detection scenarios
- Add LIBDNS_DA_NON_ROOT_TEST_ZONE environment variable for testing

This fix enables proper ACME challenge handling for subdomains in Caddy
server deployments, resolving "Domain does not belong to you" errors.
@rnavarro rnavarro merged commit a88c019 into main Sep 25, 2025
@rnavarro rnavarro deleted the rnavarro/debug-managed-domain branch September 25, 2025 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant