Skip to content
Domains and DNS2 min read

What is a subdomain?

Short answer

A subdomain is a name placed in front of your main domain, such as blog.example.com or shop.example.com, and it can point to a different site or server. It costs nothing extra to create because it's part of a domain you already own.

ArabyHost teamLast updated: ShareWhatsAppXLinkedIn
Contents
  1. How a subdomain works
  2. Practical example
  3. Common mistakes
  4. On ArabyHost

A domain name is made of labels separated by dots and read hierarchically from the right: com is the extension, example is the domain name you registered, and anything you add in front, like blog, app or mail, is a subdomain. Only the domain owner decides which subdomains exist and where they point.

How a subdomain works

A subdomain is simply a new name inside your domain’s DNS zone. It can point to:

  • The same server, a different folder: blog.example.com serves the contents of its own folder.
  • Another server: via an A record with a different IP.
  • An external service: via a CNAME record, e.g. shop.example.com → stores.provider.com.
Subdomain Common use How it’s pointed
www.example.com The main site CNAME or A
blog.example.com A WordPress blog Folder on the hosting
app.example.com A Node.js or Python app Folder or another server
staging.example.com A test copy before going live Folder on the hosting
mail.example.com Mail server A

Practical example

You want to try a new shop without touching the live site. You create test.example.com, which gets its own folder and DNS entry, install WordPress there and test it. When it works, you move it to the main site. That’s the idea behind a staging environment.

Common mistakes

  • Mixing up subdomains and addon domains: a subdomain is part of your domain; an addon domain is a different domain you own, like example.net.
  • SSL not covering the subdomain: a certificate for example.com alone doesn’t cover blog.example.com unless it’s a wildcard or was issued for both names.
  • DNS hosted elsewhere: if your zone lives at Cloudflare, for example, you must add the subdomain’s record there too, not only on the hosting.

On ArabyHost

You create subdomains in cPanel, which opens with one click from the Araby Panel, and each one gets its own folder. When the domain points to ns1.arabicode.com and ns2.arabicode.com, the DNS records are added for you and a free SSL certificate is issued automatically. Step-by-step instructions are in the create a subdomain guide.

FAQ

Do I have to buy a subdomain?

No. Any subdomain under your domain is free. You create it in your hosting panel or by adding a DNS record, without involving your registrar.

Is www a subdomain?

Technically yes. www is a subdomain, but it usually points to the main site itself.

Is blog.example.com or example.com/blog better for SEO?

Both can rank. A subfolder is simpler because it stays part of the same site; a subdomain fits better when the section is a separate app or site.

Useful? Share it with someone who needs it:WhatsAppXLinkedIn

Read next

Ready to put your idea online?

Fast, isolated hosting, support that understands you, and an AI assistant that fixes problems with you.