WordPress Subdomains for Multiple Sites

When you use WordPress Multisite with subdomains, you need to add each subdomain to cPanel or DirectAdmin and set it up to use the correct Document Root.

How to Add a Subdomain in cPanel

  1. Go to cPanel → Domains → Create a New Domain.

  2. Type in the name of the subdomain.

  3. Set the Document Root.

Screenshot placeholder: cPanel-create-subdomain.png

⚠️ Note: The Document Root is usually public_html, but if your WordPress Multisite is based on an addon domain, it may be in a different location.

How to Change an Existing Subdomain in cPanel

  1. If the subdomain already exists, click Manage next to it on the Domains screen.

  2. Set a new Document Root.

  3. Click Update.

Screenshot placeholder: cPanel-update-docroot.png

How to Add a Subdomain in DirectAdmin

  1. Go to DirectAdmin (User Level) → Subdomain Management → Add Subdomain.

  2. Type in the name of the subdomain and click Create.

Screenshot placeholder: DirectAdmin-add-subdomain.png

How to Set the Document Root in DirectAdmin

By default, DirectAdmin sets the Document Root as:

/domains/yourdomain/public_html/subdomain

To use the same Document Root as your WordPress Multisite:

  1. Click the pencil icon next to the Docroot.

  2. Set public_html and private_html to Custom.

  3. Enter the same Document Root as your WordPress Multisite.

  4. Click Save and wait a few minutes for DirectAdmin to apply the changes.

Screenshot placeholder: DirectAdmin-update-docroot.png

After this, your subdomain should be fully functional and use the correct Document Root.