Definitive Troubleshooting Guide for Let's Encrypt and SSL in DirectAdmin (CLI, CAA, and WWW Subdomain)
Back to blog

Definitive Troubleshooting Guide for Let's Encrypt and SSL in DirectAdmin (CLI, CAA, and WWW Subdomain)

6/7/2026 · 9 min · Infrastructure

Anyone who actively operates enterprise hosting panel infrastructures knows that generic, opaque panel error messages are the most frustrating daily operational bottleneck. Recently, I encountered a classic roadblock in DirectAdmin: during a standard Let's Encrypt issuance routine (triggered via the GUI for a tenant), the panel returned an enigmatic and unyielding warning: "Your request could not be executed".

End of the line. No console logs and zero structural references of the process that crashed. Because web-based admin control panel frontends tend to hide stderr returns in favor of UI aesthetics, Level-3 technical protocol demands bypassing the GUI directly to the physical terminal.


1. Forensic Diagnosis via SSH and Let's Encrypt Processing#

When DirectAdmin silently halts SSL issuance hooks, the most effective analytical tactic is to call the binary component in charge locally, signing the scope with root privileges.

1. Verify script presence and panel version#

Before troubleshooting, ensure the automated script is in the expected path and that the DirectAdmin service is running:

# Confirm the utility is present
ls -la /usr/local/directadmin/scripts/letsencrypt.sh

# Query active panel version (use 'directadmin o' as a fallback on older builds)
directadmin version

2. Run the request via CLI#

I invoked the native script directly to bypass GUI log suppression and capture the full debugging output:

/usr/local/directadmin/scripts/letsencrypt.sh request_single mydomain.com.br 4096

Bypassing the panel's logical suppression, the CLI path exposed the standard verbosity, revealing the following error trace:

[INFO] Starting Let's Encrypt certificate request for mydomain.com.br
[INFO] Verifying mydomain.com.br...
[ERROR] CAA record prevents issuing the certificate: "mydomain.com.br"
[ERROR] Unable to obtain certificate
[ERROR] _certbot command failed: exit status 1

2. The WWW Subdomain and Let's Encrypt Entry Anomaly in DirectAdmin#

If you manage websites on DirectAdmin, you are likely familiar with the standard flow for issuing a free Let's Encrypt SSL certificate. You expect to see both the apex domain and the www subdomain ready to be selected:

During a routine setup, I encountered an unusual situation: opening the Let's Encrypt module in the panel revealed that www.domain.com was missing from the checkbox selection. In its place was an unexpected item:

If you have ever opened DirectAdmin and wondered where the www entry went, here is the investigation breakdown: from checking the DNS zone to auditing server directives and getting the full certificate issued.


2.1 What is the letsencrypt.domain.com entry?#

The typical path to generate an SSL certificate in DirectAdmin is straightforward: navigate to SSL Certificates, select Free & automatic certificate from Let's Encrypt, check the desired hostnames, and click Save/Issue.

When www does not appear and you see letsencrypt.domain.com instead, here is what that entry actually does:

The practical question remains: why did DirectAdmin leave out www from the auto-generated list?


2.2 Checking the DNS zone in BIND#

The first check is making sure that the www record actually exists in the domain's DNS zone file and was not accidentally removed.

Looking at the zone records on the server:

$TTL 3600
@       IN      SOA     dns1.provider.com.      hostmaster.domain.com. (
                                                2025091600
                                                3600
                                                3600
                                                1209600
                                                86400 )

domain.com.    3600    IN      NS      dns1.provider.com.
domain.com.    3600    IN      NS      dns2.provider.com.

ftp     3600    IN      A       192.0.2.10
mail    3600    IN      A       192.0.2.10
pop     3600    IN      A       192.0.2.10
smtp    3600    IN      A       192.0.2.10
domain.com.    3600    IN      A       192.0.2.10
www     3600    IN      A       192.0.2.10

domain.com.    3600    IN      MX      10 mail

domain.com.    3600    IN      TXT     "v=spf1 a mx ip4:192.0.2.10 ~all"

What this check confirms:#

This rules out any local DNS resolution or missing entry issues.


2.3 Let\'s Encrypt directives in directadmin.conf#

The next step was checking DirectAdmin's main configuration file (/usr/local/directadmin/conf/directadmin.conf) to verify whether any global ACME flags were restricting the hostname list.

Checking Let's Encrypt parameters:

grep lets /usr/local/directadmin/conf/directadmin.conf

Output:

default_acme_provider=letsencrypt
letsencrypt=1
letsencrypt_disable_renew_after_renew_failure=0
letsencrypt_list=letsencrypt
letsencrypt_renewal_error_to_users=0
letsencrypt_renewal_failure_notice_after_attempt=5
letsencrypt_renewal_notice_to_admins=1
letsencrypt_renewal_success_notice=0
renew_letsencrypt_on_suspended_domain=1

Here is what these settings do:

Checking domain directives:

grep domain /usr/local/directadmin/conf/directadmin.conf
check_subdomain_owner=1
renew_letsencrypt_on_suspended_domain=1

Server settings were at their standard recommended defaults. The issue was not a global service failure or configuration error.


2.4 Why DirectAdmin omitted www#

When DNS is configured properly and ACME is enabled, www might not show up in the checkbox tree due to how DirectAdmin discovers eligible hostnames:

  1. Web Server Aliases vs. Panel Structure:

Web servers such as Apache and Nginx serve www automatically using ServerAlias directives. However, DirectAdmin only populates the SSL checkbox list when www is recognized in the account structure as an explicit subdomain or configured under Domain Pointers as an Alias.

  1. Manual entry in the wizard:

If DirectAdmin does not automatically list www, you can manually type www.domain.com into the additional hostnames box in the Let's Encrypt wizard. It will be included in the certificate SAN (Subject Alternative Name) without issues.

  1. Domain cache and page refreshes:

DirectAdmin caches account domain lists to keep the interface fast. Reloading the SSL page or updating domain pointers forces the backend to rescan and refresh the selection list.


2.5 Quick troubleshooting checklist#

If www goes missing when issuing SSL in DirectAdmin:

Following these checks ensures your certificate covers both domain.com and www.domain.com properly.

3. Network Pathology: Unmasking CAA Record Conflicts#

From a traffic engineering standpoint, the CAA (Certification Authority Authorization) record string, governed by RFC 8659 (which obsoletes and updates the original RFC 6844), is a "master clause" based on top-level DNS zone files. It preventively blocks unauthorized certificate issuance by enforcing a strict Whitelist designating exactly which global Certificate Authorities (CAs) are authorized to issue certificates for the domain.

Before focusing solely on CAA, it is good practice to run a comprehensive check on the DNS zone to check for any conflicting or orphaned records. However, note that dig ANY queries might be ignored, blocked, or return minimal responses on modern nameservers under RFC 8482 to prevent DDoS amplification attacks. Therefore, querying the specific CAA record type directly (dig CAA) is much more reliable:

# Query active records in the zone (subject to RFC 8482 limitations for ANY queries)
dig mydomain.com.br ANY +noall +answer

# Portability-first direct query for the CAA record
dig mydomain.com.br CAA +short

I scanned the root DNS records maintained locally on the host's authoritative resolver (mydomain.com.br). On older DNS servers or in raw BIND zone outputs, the CAA record may appear under its generic numeric type TYPE257:

mydomain.com.br. 14400   IN      TYPE257 \# 17 00056973737565616D617A6F6E2E636F6D

The system directive TYPE257 reveals the raw format of how the panel architecture natively packages the underlying CAA injection in BIND. If we reverse-convert the long hexadecimal payload (\# 17 000569...), we translate its explicit ASCII string to the following authorization rule: 0 issue "amazon.com".

The logical instruction was transmitting the following block globally: "No Certificate Authority may issue certificates for this hostname except Amazon CA". Since the handshake packets from DirectAdmin's internal AutoSSL routine submitted the Let's Encrypt validation challenge, the LE processing nodes ran a prior DNS lookup and discovered the active restriction. Consequently, they triggered an immediate compliance refusal. Investigating the client's architecture revealed dependencies on decentralized CDN structures under AWS CloudFront, mapping subdomains that justified the anomaly under Cloud Security policies.


4. Surgical Fix: CAA Record and DNS Zone Configuration#

A common amateur mistake would be to simply delete the exclusive rule dedicated to amazon.com. However, removing these restrictions would inevitably cause system failures, breaking scheduled integrations that renew automated traffic on native AWS architectures tied to the original CDNs.

The correct approach is coexistence: merging rules to allow both CAs to sign certificates. The next step is to declare the directive for standard certificates (issue) and, optionally, for wildcard certificates (issuewild) if there are dynamic subdomains to secure.

Reference: CAA record structure#

TagExampleDescription
issue0 issue "letsencrypt.org"Authorizes standard/single domain certificate issuance
issuewild0 issuewild "letsencrypt.org"Specifically authorizes wildcard certificate issuance (*.domain.com)
iodef0 iodef "mailto:[email protected]"Defines an email address or URI to report certificate policy violations

Note on Flags: The leading 0 is the non-critical flag. If changed to 128 (critical), it forces the CA to abort issuance if it does not recognize or support the property declared in the record line.

Instead of editing zone files manually, you can inject the CAA records safely using administrative APIs or the panel web GUI:

# Inject Let's Encrypt CAA record via DirectAdmin API
curl -X POST "https://your-da-server:2222/CMD_DNS_CONTROL" \
  -u "admin:admin-password" \
  -d "action=record" \
  -d "type=CAA" \
  -d "domain=mydomain.com.br" \
  -d "value=0 issue \"letsencrypt.org\""

# For wildcard support, also append the issuewild record:
curl -X POST "https://your-da-server:2222/CMD_DNS_CONTROL" \
  -u "admin:admin-password" \
  -d "action=record" \
  -d "type=CAA" \
  -d "domain=mydomain.com.br" \
  -d "value=0 issuewild \"letsencrypt.org\""

Via Web GUI: Go to DNS Management > Add Record > Type: CAA and add the two corresponding entries.

Approach b: manual hexadecimal entry in BIND zone file#

If you must interact directly with the physical zone files (*.db in BIND): The translation generated the complementary CAA directive (0 issue "letsencrypt.org"):

mydomain.com.br. 14400   IN      TYPE257 \# 22 000569737375656C657473656E63727970742E6F7267

The final zone directory layout matched both immunities in the *.db (BIND Zone) file:

mydomain.com.br. 14400   IN      TYPE257 \# 17 00056973737565616D617A6F6E2E636F6D
mydomain.com.br. 14400   IN      TYPE257 \# 22 000569737375656C657473656E63727970742E6F7267

5. Post-Fix Validation, DNS Propagation, and Certificate Issuance#

1. Query local propagation and TTL#

Verify that the local DNS server is serving the new configuration:

# Query the CAA record locally
dig mydomain.com.br CAA +short

# Verify remaining TTL
dig mydomain.com.br CAA | grep -A1 "ANSWER SECTION"

2. Verify global propagation#

Test resolution across public resolvers (Google, Cloudflare, and OpenDNS):

for dns in 8.8.8.8 1.1.1.1 208.67.222.222; do
  echo "Querying DNS $dns..."
  dig @$dns mydomain.com.br CAA +short
done

3. Online tools and dns-over-https (doh)#

Test the record output using Google's DoH JSON API, or run checkups via Qualys SSL Labs or Verisign DNSSEC Analyzer:

curl -s "https://dns.google/resolve?name=mydomain.com.br&type=CAA" | jq .

6. Production Log Triage, Rollback Procedures, and Hardening Checklist#

Rollback plan#

If the CAA record changes cause routing issues, remove the added lines from BIND's zone files or delete the records created via API, then reload the daemon to purge local cache:

# Check BIND zone syntax
named-checkzone mydomain.com.br /var/named/mydomain.com.br.db

# Reload modified zone
rndc reload mydomain.com.br

Troubleshooting flowchart#

Below is the visual troubleshooting flowchart for debugging DirectAdmin AutoSSL failures and resolving CAA record issues:

graph TD A[SSL Issuance Error in DirectAdmin] --> B[Access the Terminal via SSH] B --> C[Run letsencrypt.sh request_single] C --> D{Analyze Debugging Output} D -->|Error: CAA record prevents issuing| E[Identify Authorized CAs in DNS Zone] D -->|Other Errors| F[Check logs: error.log / letsencrypt.log] E --> G{Query CAA records via dig CAA} G --> H[Check if Let's Encrypt is authorized] H -->|Not authorized| I[Add CAA record for letsencrypt.org] H -->|Already authorized| J[Verify DNS propagation and TTL] I --> K[Inject record via DirectAdmin API or Web GUI] K --> L[Verify propagation with dig @8.8.8.8] L --> M[Request SSL Reissuance]

Server logs for troubleshooting#

To monitor automatic AutoSSL renewals and triaging:


Wrapping up: SRE reporting and soft skills#

Once the additions were committed to the named/BIND authoritative server, the natural TTL forced a delay for the global DNS cache propagation to take effect. I simplified the Level-3 analytical report for the client's non-technical stakeholders:

"Technical Resolution Report: We identified validation blocks occurring in the DNS zone configuration, triggered by an active CAA (Certification Authority Authorization) security record. Originally, the rule explicitly restricted global authenticators from issuing certificates for your domain, limiting authorization exclusively to your primary provider (amazon.com). To resolve this while preserving existing integrations and without affecting current stability, we appended the required permissive directives under RFC 8659 for the local CA (0 issue "letsencrypt.org" and 0 issuewild "letsencrypt.org"). This ensures parallel certificate operations without secondary failures. Please re-run the AutoSSL utility once the DNS zone propagation completes over the next few hours."

Forensic Operation Note: Relying unconditionally on opaque logs exposed purely via GUI tools leaves sysadmins in the dark. The raw terminal console, unfiltered, transcribes the absolute truth, tracking down the issue in seconds. Understanding how external variables in limitative DNS keys (CAA/TXT/SRV) cause friction minimizes blind spots, saving precious troubleshooting time.

Was this article helpful?

Leave a quick reaction to help prioritize future technical guides:

CC BY-NC

This post is licensed under CC BY-NC.

Comments

Join the discussion below.

0 comments