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

Source: https://srvscripts.com/guides/directadmin-subdomain-www-not-working/
Updated: 2026-10-21
Publisher: srvScripts (https://srvscripts.com/)

**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.

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…

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](https://docs.directadmin.com/changelog/version-1.710.html) 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
