Emergency server help: get in touch

www.sub.example.com Not Working in DirectAdmin After 1.710: How to Bring It Back (Tested)

Why www.sub.example.com stopped working after DirectAdmin 1.710, how to find affected subdomains, and the www subdomain plus redirect that keeps HTTPS valid. Tested on DirectAdmin 1.712.

Published Updated 5 min read

Short answer: Since 1.710, a DirectAdmin subdomain www alias is no longer created: subdomains no longer get an automatic www. alias, and on 1.712 a new subdomain also got no www DNS record. The fix that keeps HTTPS working is to create a second subdomain called www.sub and redirect it to sub.example.com; DirectAdmin then adds the DNS record (in its own zone; if your DNS is hosted elsewhere, add it there) and includes the name in the domain’s certificate. A ServerAlias in a custom HTTPD entry answers on HTTP but leaves the name out of the certificate.

Links like www.blog.example.com are still out there in old emails and bookmarks. To see what changed for the DirectAdmin subdomain www name, we created a subdomain on DirectAdmin 1.712, looked at what it answers on, and tried two ways to bring the www name back.

DirectAdmin subdomain www behaviour on 1.712

  • A virtual host for blog.example.com with no ServerAlias line.
  • A DNS A record for blog and none for www.blog.
  • Its own folder: /home/USER/domains/blog.example.com/public_html, not public_html/blog inside the main domain. The path is stored in example.com.subdomains.docroot.override.
  • A certificate name for blog.example.com only.

A request for www.blog.example.com therefore either fails in DNS or, if a wildcard record points at the server, lands on the server’s default page (“webserver is functioning normally” on ours).

Find subdomains that used the old alias

The DirectAdmin 1.710 changelog describes the change, and DirectAdmin ships a maintenance task for it, create-subdomain-www-aliases. It treats a www alias as used when a certificate exists for it. The check is read-only:

curl -s -X POST -u "admin:LOGIN_KEY" \
  "https://server.example.com:2222/api/maintenance/create-subdomain-www-aliases/check"

On our server it returned "issues":0. When it reports issues, its fix action creates the www subdomains described next. We did not run the fix action, because our test server had nothing for it to fix.

Fix: add www.sub as its own subdomain

Create a subdomain named www.blog under the domain, in the panel or through the API:

curl -s -X POST -u "USER:LOGIN_KEY" "https://server.example.com:2222/CMD_API_SUBDOMAINS" \
  --data "action=create&domain=example.com&subdomain=www.blog"

DirectAdmin accepted the dotted name, created /home/USER/domains/www.blog.example.com/public_html, and added a www.blog A record to the zone. That zone only matters if DirectAdmin is the domain’s authoritative DNS: if the domain uses Cloudflare, the registrar’s DNS or another provider (check with dig +short NS example.com), add the www.blog record there first, otherwise the certificate request cannot validate the new name. The next certificate request for the domain included www.blog.example.com; run it yourself rather than waiting: da taskq --run "action=rewrite&value=letsencrypt&domain=example.com". Then send visitors to the real subdomain with an .htaccess file in the new folder:

cat > /home/USER/domains/www.blog.example.com/public_html/.htaccess <<'EOF'
RewriteEngine On
RewriteRule ^(.*)$ https://blog.example.com/$1 [R=301,L]
EOF
chown USER:USER /home/USER/domains/www.blog.example.com/public_html/.htaccess

Both http://www.blog.example.com/page?x=1 and the HTTPS version returned 301 to https://blog.example.com/page?x=1, keeping the path and query string. If you would rather serve the same site on both names, point the www subdomain’s document root at the blog folder instead of redirecting. To move a main domain to another folder, see custom document root for one domain; for custom templates that still use old tokens, see the DOCROOT token change.

Why not a ServerAlias?

We also tried the old approach: a custom HTTPD entry with |*if SUB="blog"|, ServerAlias www.blog.example.com, |*endif|, plus a manual DNS record. HTTP worked. But the next certificate request still covered the same seven names as before; DirectAdmin builds the certificate’s name list from its own domains, subdomains and pointers, not from custom aliases. HTTPS visitors would see a certificate name error. On a domain with a pointer, the alias was also added to the pointer’s subdomain virtual host.

Check the result

dig +short www.blog.example.com
curl -sI http://www.blog.example.com/ | head -3
echo | openssl s_client -connect blog.example.com:443 -servername www.blog.example.com 2>/dev/null \
  | openssl x509 -noout -ext subjectAltName | tr ',' '\n' | grep www.blog

If the certificate does not list the name yet, request it: da taskq --run "action=rewrite&value=letsencrypt&domain=example.com". DirectAdmin skips names that do not resolve to the server, without logging it, as described in what happens to SSL when you rename a domain.

How we tested

  • Server: DirectAdmin 1.712 on AlmaLinux 9.8 with Apache 2.4 (CustomBuild), Let’s Encrypt staging certificates, 19–20 October 2026.
  • Subdomain blog created through CMD_API_SUBDOMAINS; checked the generated httpd.conf, the zone file and HTTP responses; then the custom ServerAlias approach and the www subdomain approach, each followed by a certificate request.
  • Not tested: the maintenance task’s fix action, nginx and LiteSpeed, and subdomains that existed before an upgrade to 1.710.

FAQ

Why does www on my subdomain show the default server page?

DirectAdmin 1.710 stopped adding the automatic www alias to subdomains, so no virtual host claims the name and Apache falls back to the default host.

Can I create a subdomain called www.sub in DirectAdmin?

Yes. DirectAdmin 1.712 accepted www.blog as a subdomain name, created DNS and a folder for it, and added it to the certificate. That is also what DirectAdmin’s own maintenance fix does.

Is a 301 redirect from www.sub to sub good for SEO?

Yes. A single permanent redirect to one canonical host is the normal way to merge two names.

Where are new subdomain files stored in DirectAdmin 1.712?

In /home/USER/domains/sub.example.com/public_html on our server, with the path recorded in the domain’s subdomains.docroot.override file.

At a glance

www.sub.example.com Not Working in DirectAdmin After 1.710: How to Bring It Back (Tested) summary card: Since 1.710, a DirectAdmin subdomain www alias is no longer created: subdomains no longer get an automatic www. alias, a…
In short: Since 1.710, a DirectAdmin subdomain www alias is no longer created: subdomains no longer get an automatic www. alias, and on 1.712 a new subdomain also got no www DNS record. The fix that k…

Share this guide

Free website test

Is your website set up right?

Check SSL, security headers, redirects, robots.txt, sitemap, llms.txt and security.txt in one test. It takes about 30 seconds.