blog.example.com, shop.example.com, support.example.com, these are all subdomains. They are handy for separating different parts of your website. But when do you use a subdomain and how do you create one?

What is a subdomain?

A subdomain is a prefix to your main domain. In blog.example.com, "blog" is the subdomain and "example.com" is the main domain. Technically it is a separate domain, but you do not have to pay for it separately, it falls under your existing domain name.

What do you use subdomains for?

Separated content

  • blog.example.com: your blog separate from your main site
  • shop.example.com: your online store separate from your informational pages
  • support.example.com: help centre or knowledge base

Test and development environments

  • staging.example.com: test version of your site
  • dev.example.com: development environment

Different languages or regions

  • en.example.com: English version
  • de.example.com: German version

Apps and tools

  • app.example.com: web application
  • api.example.com: API endpoint
  • mail.example.com: webmail access

Subdomain vs subfolder

You can also separate content with a subfolder: example.com/blog instead of blog.example.com. Which is better?

Aspect Subdomain Subfolder
SEO Separate authority Shares the main domain's authority
Technical Can run on a different server Same server as the main site
Management Fully separately manageable Part of the main site
Branding Its own feel Part of the whole

Rule of thumb: for SEO a subfolder is often better (it shares link value). For technical separation or separate applications, a subdomain is handier.

Creating a subdomain: step by step

Step 1: log in to your control panel

Go to DirectAdmin, cPanel or your hosting control panel.

Step 2: find "Subdomains"

In DirectAdmin: Domain Setup -> Subdomain Management
In cPanel: Domains -> Subdomains

Step 3: create the subdomain

  • Enter the name (e.g. "blog")
  • Select the main domain
  • Choose the document root (folder where the files go)
  • Click create

Step 4: wait for DNS

The subdomain is usually active within minutes. Sometimes it takes up to an hour.

SSL for subdomains

Each subdomain needs a separate SSL certificate. With Let's Encrypt you can create free certificates for all your subdomains. With many hosting providers this happens automatically.

A wildcard certificate (*.example.com) covers all subdomains at once, but is more complex to set up.

Frequently asked questions

Does a subdomain cost extra?

No, subdomains are free. You create them under your existing domain name.

How many subdomains can I have?

Technically unlimited. In practice it depends on your hosting plan, check how many subdomains are allowed.

Is a subdomain good for SEO?

A subdomain is seen by Google as a separate domain. It builds its own authority, separate from your main domain. For most content, a subfolder (example.com/blog) is better for SEO.

Can I forward a subdomain?

Yes, you can have a subdomain redirect to another URL. Handy for shorter links or old subdomains.

Getting started

Setting up subdomains

You create a subdomain through your hosting panel:

  1. Log in to your control panel (cPanel, DirectAdmin, Plesk)
  2. Find "Subdomains"
  3. Enter the name (e.g. "blog" for blog.yoursite.com)
  4. Choose the document root (the folder where the files go)
  5. Click create

The subdomain is available immediately. DNS propagation can take up to 24 hours before it works everywhere.

Common subdomains

www vs no www

Technically, www. is a subdomain. Most sites use www.site.com or site.com (without www). Choose one as the primary and redirect the other to it for consistency and SEO.

Functional subdomains

  • blog.site.com: separate blog environment
  • shop.site.com: online store
  • support.site.com: helpdesk or knowledge base
  • api.site.com: for developers, API endpoints
  • mail.site.com: webmail access

Development and testing

  • dev.site.com: development environment
  • staging.site.com: test environment for reviews
  • beta.site.com: beta version for early adopters

Subdomains and SSL

Each subdomain needs its own SSL certificate. With Let's Encrypt you request a certificate per subdomain, or you use a wildcard certificate (*.yoursite.com) that covers all subdomains.

Wildcard certificates are handy if you have many subdomains but require DNS validation instead of HTTP validation.

Subdomains vs subfolders

There is debate about what is better for SEO: subdomains or subfolders:

  • Subdomain: blog.site.com
  • Subfolder: site.com/blog/

Google largely treats subdomains as separate sites. This means link value does not automatically flow through. For content that should strengthen your main site, subfolders are often better. For standalone applications, subdomains are fine.

Practical example: you strengthen the SEO of a WordPress blog by placing it in a subfolder. A separate online store application can happily sit on a subdomain.

Managing subdomains

Tips for effective subdomain management:

  • Keep an overview of all your subdomains and what they are for
  • Remove subdomains you no longer use
  • Secure each subdomain with its own SSL certificate
  • Monitor subdomains for uptime just like your main site
  • Use clear, logical names that describe the function

Subdomains are a powerful tool for organising your online presence. Use them strategically for separate projects, environments or services while benefiting from your existing domain authority.

Subdomains are a powerful tool for website management. They help you organise content without having to buy extra domains. A blog, online store or test environment on a separate subdomain keeps your website clear and professional. Creating one takes just a few minutes and the possibilities are endless. Also consider subdomains for seasonal campaigns or special landing pages that you want to track separately in your analytics.

Subdomains make your website structure clear. Use them strategically for different parts of your online presence.

With subdomains you keep your main domain clean and clear. Feel free to experiment with this powerful organisation tool for your web projects.

Subdomains are free to create and offer endless possibilities for your website.

Creating a subdomain: DNS configuration in detail

Creating a subdomain also involves the correct DNS configuration. Depending on your setup there are different DNS records you can use:

DNS Record Type Use Example
A record Subdomain to an IP address blog.site.com -> 123.45.67.89
CNAME record Subdomain to another domain shop.site.com -> myshop.shopify.com
MX record Email for the subdomain mail.site.com -> mail server
TXT record Verification and configuration _verify.site.com -> verification code

When to use an A record

Use an A record if the subdomain points to the same server as your main domain. This is the standard method when you create a subdomain through your hosting panel.

When to use a CNAME

Use a CNAME if your subdomain points to an external service. For example if your online store runs on Shopify or your helpdesk on a SaaS platform. The CNAME record makes sure traffic is automatically forwarded to the correct server.

Creating a subdomain: SEO considerations

The choice to create a subdomain has consequences for your search engine optimisation. Here are the most important SEO considerations:

Google largely treats a subdomain as a separate website. This means backlinks to blog.yoursite.com do not automatically strengthen the authority of yoursite.com. If SEO is important and your content should strengthen your main domain, consider a subfolder instead of a subdomain.

When a subdomain is nonetheless better for SEO

  • Completely different content: if the subdomain contains totally different content from your main site, a separate domain can actually help to create clarity
  • Technical necessity: if you need a different CMS or framework, a subdomain is the logical choice
  • International sites: for language versions, subdomains (en.site.com) can work, although subfolders (site.com/en/) are also popular
  • Standalone applications: a web app that stands apart from your marketing site belongs on a subdomain

Google Search Console per subdomain

Do not forget to register each subdomain separately in Google Search Console. Because Google treats subdomains as separate sites, you need your own data for each subdomain about indexing, search performance and any problems.

Do you want to know more about domain names? See our domain name information or read how to manage multiple domains on one hosting plan.

Creating a subdomain: best practices and tips

Creating a subdomain is technically simple, but there are best practices you should follow to prevent problems and get the most out of your subdomains:

Naming and structure

Choose logical, descriptive names for your subdomains. Use English terms for technical subdomains (api, staging, dev) and terms that fit your brand for customer-facing subdomains.

Security per subdomain

Each subdomain has its own security considerations. Make sure you have a separate SSL certificate per subdomain or use a wildcard certificate. Isolate sensitive applications on their own subdomains so that a security hole in one application does not affect the other.

Documenting subdomains

Keep a register of all subdomains you have created, including their purpose, the person responsible and when they were created. In growing organisations the overview otherwise quickly gets lost.

Cleaning up unused subdomains

Subdomains that are no longer used form a security risk. They may contain outdated software or be abused by malicious parties if they point to an expired service (subdomain takeover). Regularly check which subdomains are active and remove the rest.

Setting up monitoring

Just like your main domain, important subdomains should also be monitored for availability. Set up uptime monitoring for production subdomains so that you are quickly aware of problems.

Creating a subdomain and email

A common question when creating a subdomain is whether you can also use email addresses with subdomains, for example admin@blog.yoursite.com. The answer is yes, but it is rarely recommended. Email addresses with subdomains look unprofessional and are blocked more often by spam filters. Better use the main domain for email and reserve subdomains for websites and applications.

You can, however, use subdomains for email-related services. Think of webmail.yoursite.com for the webmail interface or autodiscover.yoursite.com for automatic email configuration. These technical subdomains improve the user experience without you using subdomains as email addresses.

With Theory7 web hosting you can easily create subdomains through DirectAdmin. Including free SSL for each subdomain.

Creating a subdomain: advanced applications

Creating a subdomain offers many more possibilities than just hosting a separate section of your website. Below we discuss advanced applications that can strengthen your business or project.

Subdomains for multilingual websites

A popular application is using subdomains for different language versions of your website. For example: nl.yourdomain.com for Dutch, en.yourdomain.com for English, de.yourdomain.com for German. This has several advantages:

  • Each language version can use its own CMS installation with its own content
  • Search engines understand the language structure and show the right version to the right users
  • You can host each language version on a different server if needed
  • Technical problems in one version do not affect the others

Subdomains for applications and APIs

Many companies use subdomains to separate different services: api.yourdomain.com for the API, app.yourdomain.com for the web application, and cdn.yourdomain.com for static files through a CDN. This separation makes management clearer and improves security.

DNS configuration when creating a subdomain

When you create a subdomain, you have to set up the correct DNS records. The type of record depends on the application:

DNS record typeUseExample
A recordPoints a subdomain to an IP addressshop.domain.com to 192.168.1.1
CNAMEAlias to another domainwww.domain.com to domain.com
MX recordEmail for the subdomainmail.domain.com to a mail server
TXT recordVerification or SPF_verify.domain.com to a verification code

Wildcard subdomains

With a wildcard DNS record (*.yourdomain.com) you can automatically point all possible subdomains to the same IP address. This is particularly useful for platforms that assign dynamic subdomains to users, such as customer1.yourplatform.com and customer2.yourplatform.com.

SEO considerations with subdomains

The choice between a subdomain and a subdirectory has an impact on your findability in search engines. Search engines largely treat subdomains as separate websites, which has both advantages and disadvantages:

  • Advantage: a subdomain can rank independently for specific keywords
  • Advantage: technical problems on the subdomain do not affect the main domain
  • Disadvantage: link authority is not automatically shared between the main domain and the subdomain
  • Disadvantage: you have to work separately on the SEO of each subdomain

The general rule of thumb is: use a subdirectory (yourdomain.com/blog/) for content that is directly related to your main website, and use a subdomain for standalone applications or services. Also consider tracking your website statistics separately for each subdomain so you can monitor performance properly.

Creating a subdomain through your hosting panel

Creating a subdomain follows a similar process in most hosting panels. Below we explain how it works in the most popular panels.

In cPanel you navigate to the "Domains" section and click "Subdomains". Enter the name of the subdomain, select the main domain and specify the document root. cPanel automatically creates the required folder structure and DNS records. You can then upload files to the created folder.

In DirectAdmin you go to "Subdomain Management" under the "Account Manager" heading. Click "Add Subdomain", enter the name and choose whether the subdomain gets its own document root or shares an existing folder. DirectAdmin also offers the ability to link subdomains to specific PHP versions, which is handy if you run an application that requires a different PHP version.

In Plesk you find the option under "Websites and Domains". Click "Add Subdomain" and configure the settings. Plesk offers extensive options for SSL certificates per subdomain and even lets you run a separate WordPress installation on each subdomain. This makes Plesk particularly suitable for web developers who manage multiple projects.

Whichever panel you use, do not forget to request an SSL certificate for your new subdomain. With most hosting providers you can install free Let's Encrypt certificates. Without SSL, browsers show a warning that scares visitors away. After creating it, check whether the subdomain is reachable correctly and whether both the HTTP and HTTPS versions work.

Creating a subdomain: best practices summarised

When creating a subdomain there are several best practices that help you set up a well-organised and secure structure. Use descriptive names that immediately make clear what the subdomain contains: shop.domain.com, blog.domain.com, api.domain.com. Avoid cryptic names or numbers that are incomprehensible to others.

Limit the number of subdomains to what is actually needed. Each subdomain requires its own DNS records, SSL certificates and possibly separate monitoring. A proliferation of subdomains makes management unnecessarily complex and increases the attack surface. Document all your subdomains and their purpose in a central overview that is accessible to your team. Secure each subdomain with its own SSL certificate or use a wildcard certificate that covers all subdomains. After creating it, always test whether the subdomain is reachable correctly over both HTTP and HTTPS, and set up a redirect from HTTP to HTTPS so that visitors always browse over the secure connection.

Creating a subdomain: frequently asked questions

The same questions come up regularly when creating a subdomain. Does a subdomain cost extra? No, with most hosting providers you can create unlimited subdomains without extra costs. You only pay if the subdomain requires a separate hosting environment or extra resources. Does a subdomain need a separate SSL certificate? Yes, a standard SSL certificate only covers the main domain and www version. Use a wildcard certificate to cover all subdomains, or install a free Let's Encrypt certificate per subdomain. Can I point a subdomain to an external server? Yes, by creating an A record or CNAME record that points to the IP address or hostname of the external server. This is a widely used method to host services on different servers under the same domain.

Subdomains and search engine optimisation

An important aspect when creating subdomains is the impact on your SEO strategy. Google treats subdomains as separate websites, which means the authority of your main domain does not automatically carry over to your subdomains. For most situations a subdirectory is therefore better for SEO than a subdomain. Only use subdomains when there is a clear technical or organisational reason, such as running a different application or separating strongly different content areas. If you do choose subdomains, make sure each subdomain has its own XML sitemap, is registered in Google Search Console and has unique, valuable content. Link regularly between your main domain and subdomains to clarify the relationship for search engines and to encourage visitor traffic between the different parts.

Do you want to know whether a domain name is still available? Use our free domain name checker to check this immediately.