Back to the knowledge base
Domeinnamendnshandleiding

Creating a subdomain: when and why?

A subdomain is a name in front of your domain name, such as shop.yourdomain.be or clients.yourdomain.be. You create it in the control panel of your hosting, make sure a DNS record points to the right server and arrange an SSL certificate for the new name. There is nothing to register: a subdomain belongs to the domain name you already have.

What a subdomain is

Technically it is a name of its own in the DNS of your domain, with its own record. That is why a subdomain can point to a different folder on your hosting, but just as easily to an entirely different server or to an external service. Even www is really a subdomain.

Subdomain or subfolder?

A subfolder is yourdomain.be/shop, a subdomain is shop.yourdomain.be.

  • Choose a subdomain for something that stands apart from your site: a customer portal, a test environment, an application with its own software, or a third-party service that has to run under your name, such as a helpdesk, a booking tool or a newsletter platform.
  • Choose a subfolder for content that belongs to your site and should count in search engines: a blog, a knowledge base, a webshop within the same site. Search engines largely treat a subdomain as a separate site that has to build its own reputation.

If in doubt, go for the subfolder. It needs no DNS record and no extra certificate.

Creating a subdomain in the control panel

At WWW4 you open the control panel from the customer portal. The labels differ from panel to panel, but the steps are the same everywhere.

  1. In the control panel, open the section for domains or subdomains and choose to add a new subdomain.
  2. Enter only the first part, for example shop. The panel adds your domain name itself.
  3. Choose the folder that will hold the files of the subdomain. The panel usually suggests one. If both get their own CMS, do not put the subdomain inside the folder of your main site.
  4. Save. If the DNS of your domain is with the same provider, the DNS record is generally created at the same time.
  5. Put a test file in the folder and open the subdomain in your browser.
  6. Sort out the SSL certificate as soon as the subdomain is reachable.

The DNS record

If your DNS is with a different party from your hosting, for example with Cloudflare or with the registrar of your domain name, you create the record there yourself. There are two options.

  • An A record with the first part of the subdomain as its name and the IP address of the server as its value. You use this for a subdomain on your own hosting.
  • A CNAME record that points to another hostname. You use this for an external service; that service gives you the exact value. A single name can never hold a CNAME and another record at the same time.

The steps are in adding or changing a DNS record. A new record is generally visible within the hour; why it sometimes takes longer is explained in DNS propagation explained.

SSL for the subdomain

A certificate is only valid for the names listed in it. So the certificate for yourdomain.be does not automatically cover shop.yourdomain.be, and without a certificate the browser shows the label Not secure or a warning that the connection is not private. Every WWW4 hosting plan includes a free Let's Encrypt certificate that renews automatically. When such a certificate is requested, a check is made that the name really points to your server. So the DNS record has to be right first; only then will the request succeed. If the subdomain runs at an external service, that service takes care of the certificate. You can read more about paid certificates on SSL certificates; what the browser warning means is covered in "Not secure" in the browser: what now.

Common mistakes

  • The full name in the name field. If you type shop.yourdomain.be while the panel adds your domain itself, the record ends up on shop.yourdomain.be.yourdomain.be and nobody can find it.
  • The record in the wrong panel. A record only counts at the party the nameservers of your domain point to.
  • DNS only, no subdomain on the hosting. The record points to the server, but the server does not know the name. You then get the main site or a default page.
  • A test environment that ends up in Google. Put a password on a test subdomain, or indicate that it must not be indexed.
  • Typing www in front of it as well. www.shop.yourdomain.be is yet another name, with its own record and its own certificate. Do not use that form.

Frequently asked questions

Does a subdomain cost anything?

The name itself does not: you only pay for the domain name the subdomain hangs under. What can cost money is the hosting or the external service the subdomain points to.

How long does it take for a subdomain to work?

A new record is generally live within the hour. If you tested the name before the record existed, your computer or your internet provider remembers that empty answer for a while. In that case, test over the mobile network of your phone.

Is a subdomain bad for SEO?

Not bad, but separate. Content on a subdomain builds its own reputation and strengthens your main site less than the same content in a subfolder. For a portal or an application that makes no difference.

Still stuck?

Send us the name of the subdomain and what you see when you open it via contact. We will check whether the record, the hosting or the certificate is the cause.

#create a subdomain#subdomain or folder#subdomain dns
Still stuck?

Does it behave differently than described above, or are you stuck anyway? Get in touch with your domain name or customer number at hand and we will take a look with you.

Contact support
Call us
Send an email