📂 Domain 📅 October 25, 2026 ⏱ 12 min read

What is a Subdomain? How to Create & Configure in DirectAdmin

What is a Subdomain — DirectAdmin Setup Guide

1. What is a Subdomain?

A subdomain is an extension added before your main domain name, separated by a dot (.). If your main domain is example.com, subdomains would look like:

Technically, subdomains work through DNS Records — they point to an IP address or CNAME of a target server. This means each subdomain can reside on the same server as your main site or on a completely different one.

💡 Did you know? "www" is itself a subdomain! When you type www.example.com, you are accessing the "www" subdomain of example.com.

2. Benefits of Using Subdomains

3. Common Subdomain Examples

SubdomainPurposeExample URL
wwwMain website (most common)www.example.com
blogBlog or articles sectionblog.example.com
shop / storeE-commerce storeshop.example.com
apiAPI endpoint for developersapi.example.com
mailWebmail or email servicemail.example.com
dev / stagingDevelopment/testing environmentdev.example.com
cdnContent delivery for static filescdn.example.com
docsDocumentation portaldocs.example.com
mMobile-specific websitem.example.com
appWeb applicationapp.example.com

4. Subdomain vs Subdirectory — Which Should You Choose?

This is one of the most frequently asked questions in web development. Here are the key differences:

AspectSubdomain (blog.example.com)Subdirectory (example.com/blog)
SEOGoogle treats it as a separate siteShares SEO authority with main domain
ManagementIndependent, decoupledSame system as main site
HostingCan use different serversMust be on same server
SSLNeeds separate cert or WildcardUses same SSL as main domain
Best forSeparate apps, APIs, services, different tech stacksBlog, portfolio, content marketing
🎯 Recommendation For maximum SEO benefit from your main domain's authority, choose a subdirectory (example.com/blog). Use subdomains when you genuinely need separate infrastructure, different technologies, or fully independent services.

5. Creating a Subdomain in DirectAdmin

DirectAdmin makes creating subdomains quick and easy. Follow these steps:

Step 1: Log into DirectAdmin

Open your browser and navigate to https://your-domain.com:2222 or the URL provided by AsiaGB. Enter your Username and Password.

Step 2: Go to Domain Setup

From the Dashboard, click "Domain Setup" under Your Account section, or search for "Subdomain" in the navigation.

Step 3: Select Domain and Create Subdomain

  1. Click on your main domain name
  2. Click the "Subdomains" link
  3. In the "Create Subdomain" field, enter your subdomain name (e.g., blog)
  4. Click the "Create" button

DirectAdmin will automatically create the subdomain, a DNS A record pointing to your server's IP, and a new folder at ~/domains/your-domain.com/public_html/blog.

Step 4: Upload Your Website Files

Upload your website files to the folder DirectAdmin created, or use the built-in File Manager in DirectAdmin to add your content.

⚠️ DNS Propagation Time DNS changes take time to propagate across the internet, typically 1–24 hours. Your new subdomain may not be immediately accessible after creation. This is normal — just wait and try again.

6. DNS Records for Subdomains

DirectAdmin automatically manages DNS for subdomains created through its interface. However, if you need to manually configure DNS or point a subdomain to a different server:

A Record — Point Subdomain to an IP Address

Name: blog
Type: A
Value: 203.xxx.xxx.xxx   (your server's IP address)
TTL: 3600

CNAME Record — Point Subdomain to Another Domain

Name: shop
Type: CNAME
Value: myshop.myshopify.com.   (note the trailing dot)
TTL: 3600

Use CNAME records to point a subdomain to external services like Shopify, GitHub Pages, Netlify, or other cloud platforms.

📌 Editing DNS in DirectAdmin Navigate to DNS Management → select your domain → click "Add Record" or "Modify" to edit existing records.

Checking DNS Propagation

Use these commands to verify DNS propagation:

nslookup blog.example.com
# or
dig blog.example.com A

7. SSL Certificates for Subdomains

Every website — including subdomains — should have SSL. There are two main approaches:

Option 1: Free Let's Encrypt via DirectAdmin

  1. Go to DirectAdmin → SSL Certificates
  2. Select "Let's Encrypt"
  3. Choose the subdomain you want to secure
  4. Click "Save" — the system will automatically issue the certificate

Option 2: Wildcard SSL Certificate

If you have multiple subdomains, a Wildcard SSL (*.example.com) is more convenient — it covers all subdomains with a single certificate. AsiaGB offers Wildcard SSL starting at 5,000 THB/year.

SSL TypeCoveragePriceBest For
Let's EncryptOne domain/subdomain at a timeFree1–2 subdomains
RapidSSL DV1 domain or 1 subdomain1,000 THB/yrCritical subdomains
RapidSSL Wildcard*.example.com (all subdomains)5,000 THB/yrMultiple subdomains

8. Deleting a Subdomain in DirectAdmin

When you no longer need a subdomain:

  1. Go to DirectAdmin → Domain Setup
  2. Click your main domain → Subdomains
  3. Check the box next to the subdomain you want to remove
  4. Click "Delete Selected"
⚠️ Important Note Deleting a subdomain removes the DNS record automatically, but the folder and files remain on the server. You must manually delete the folder through File Manager if you want to remove the files too.

9. Best Practices for Subdomains

🚀 Get Started with AsiaGB Hosting AsiaGB Hosting supports unlimited subdomains in DirectAdmin with 99% Uptime and 19+ years of experience. View our hosting plans at asiagb.com/hosting-en.html

10. Frequently Asked Questions

❓ What is a subdomain?

A subdomain is a prefix added before your main domain, separated by a dot. For example, "blog" in blog.example.com is the subdomain. It lets you create separate sections of your website without buying a new domain name.

❓ Subdomain vs subdirectory — which is better for SEO?

Google treats subdomains as separate sites, meaning they don't automatically benefit from your main domain's authority. Subdirectories (example.com/blog) share SEO authority. For content marketing, subdirectories are generally preferred.

❓ How do I create a subdomain in DirectAdmin?

Log into DirectAdmin → Domain Setup → click your main domain → Subdomains → enter the subdomain name → click Create. DirectAdmin creates the DNS record and folder automatically.

❓ Can I use SSL on a subdomain?

Yes — you can get a free Let's Encrypt certificate for each subdomain via DirectAdmin, or purchase a Wildcard SSL (*.example.com) that covers all your subdomains with a single certificate.

❓ How many subdomains can I create on AsiaGB Hosting?

AsiaGB Hosting allows unlimited subdomains in DirectAdmin. Create as many as your project requires at no additional cost.

❓ How long does subdomain DNS propagation take?

DNS propagation typically takes 1–24 hours. Use dig blog.example.com A or an online DNS checker to verify when your subdomain has propagated.

Conclusion

Subdomains are a powerful and flexible tool for organizing your web presence. Whether you need a separate blog, an e-commerce store, a development environment, or an API endpoint, DirectAdmin on AsiaGB Hosting makes creating and managing subdomains straightforward — just a few clicks.

Remember to set up SSL for every subdomain and configure DNS correctly for optimal security and performance. Have questions about subdomains or domain management? The AsiaGB team is available 24/7 at asiagb.com/contact-en.html