Creating a Subdomain in DirectAdmin: Guide
A subdomain is a separate section of your main domain that you can use for specific purposes. In this guide, we explain how to create subdomains in DirectAdmin.
What is a Subdomain?
A subdomain is a prefix for your main domain that points to a separate section of your website. Examples:
- blog.yoursite.nl - for your blog
- shop.yoursite.nl - for your webshop
- support.yoursite.nl - for your helpdesk
- staging.yoursite.nl - for test versions
Advantages of Subdomains
- Organization: Keep different sections separate
- SEO: Subdomains can rank separately in Google
- Separate Installations: Install WordPress, Magento, or other software separately
- Security: Isolate sensitive sections
- Testing: Create staging environments without affecting production
Subdomain vs. Subdirectory
| Feature | Subdomain | Subdirectory |
|---|---|---|
| URL | blog.site.nl | site.nl/blog |
| SEO | Separate website | Part of main site |
| Installation | Own root folder | Within public_html |
| SSL | Own certificate | Same as main site |
Create a Subdomain
Step 1: Log in to DirectAdmin
- Go to the DirectAdmin login portal of Theory7
- Enter your username and password
- Click on Log in
Step 2: Navigate to Subdomain Management
- Look for Domain Setup or Subdomain Management in the menu
- Click on Subdomains or Subdomeinen
- You will see an overview of existing subdomains
Step 3: Create a New Subdomain
- Click on Create Subdomain or Subdomein aanmaken
- Enter the subdomain name (e.g., `blog`, `shop`, `test`)
- Select the main domain if you have multiple
- Click on Create or Aanmaken
Step 4: Configure the Subdomain
After creation, a folder is automatically created:
- Location: `/domains/yoursite.nl/public_html/blog` (for subdomain blog)
- Or: `/domains/blog.yoursite.nl/public_html` (as a separate domain)
Manage Subdomains
Upload Content
- Connect via FTP to your server
- Navigate to the subdomain folder
- Upload your files (index.html, WordPress, etc.)
Delete a Subdomain
- Go to Subdomain Management
- Find the subdomain in the list
- Click on Delete or Verwijderen
- Confirm the action
Note: When deleting, all files in the folder will also be removed!
Redirect a Subdomain
You can redirect a subdomain to another URL:
- Go to Subdomain Management
- Click on the subdomain
- Select Redirect or Doorverwijzen
- Enter the target URL
- Click on Save
Install WordPress on Subdomain
Via Installatron
- Go to Installatron in DirectAdmin
- Search for WordPress
- Click on Install
- For Domain, select your subdomain
- Follow the installation wizard
Manually
- Download WordPress from wordpress.org
- Upload to the subdomain folder via FTP
- Create a database in DirectAdmin
- Open the subdomain in your browser
- Follow the WordPress installation
SSL for Subdomains
Let's Encrypt SSL
- Go to SSL Certificates in DirectAdmin
- Click on Free & automatic certificate from Let's Encrypt
- Check your subdomain
- Click on Save
Wildcard SSL
A wildcard SSL (*.yoursite.nl) automatically covers all subdomains. Contact support for configuration.
DNS Settings
Subdomains automatically receive the correct DNS records. Check in the DNS Zone Editor:
blog A 123.45.67.89 (same IP as main domain)
shop A 123.45.67.89
External Subdomain
Do you want to point a subdomain to an external service?
- Go to DNS Zone Editor
- Add an A or CNAME record:
- A record: `extern A 98.76.54.32` (external IP)
- CNAME: `extern CNAME example.com.` (external domain name)
Common Issues
Subdomain Shows Main Site
- Check if the subdomain folder exists
- Verify that there is an index.html or index.php in it
- Wait for DNS propagation (up to 24 hours)
Cannot Create Subdomain
- Check if the subdomain name is valid (only letters, numbers, dashes)
- Verify that the subdomain does not already exist
- Check your account limits
SSL Not Working on Subdomain
- Request a separate SSL certificate
- Or configure a wildcard certificate
- Wait 15-30 minutes after request
Tips for Subdomains
- Short Names: Use short, clear names (blog, shop, app)
- Consistent: Keep naming consistent across all projects
- Backup: Make backups for your subdomains before making changes
- Don't Forget SSL: Each subdomain needs SSL
- Use Staging: Test changes first on a staging subdomain
Related Articles
- Setting up Cronjobs in DirectAdmin
- Configuring SpamAssassin in DirectAdmin
- Changing Password in DirectAdmin
Need Help?
We are here for you! Are you facing any issues or have questions? Our support team is happy to assist you personally. Send us a message via the ticket system - we usually respond within a few hours and are happy to help.
0 van 0 vonden dit nuttig