Subdomain vs subdirectory: which should I use?

Subdomain vs subdirectory: which should I use?

When adding a new section to your website, such as a blog or shop, you can host it either on a subdomain or in a subdirectory.

SubdomainSubdirectory
Exampleblog.yourdomain.co.ukyourdomain.co.uk/blog
Treated by search engines asA separate sitePart of your main site
Set up in cPanel viaDomainsJust a folder in public_html

When to choose a subdomain

  • A staging or test copy of your site (e.g. staging.yourdomain.co.uk)
  • A separate application with its own software, such as a help desk or booking system
  • A section in a different language or region that you want to manage independently

When to choose a subdirectory

  • A blog, news section or shop that should share your main site's search ranking
  • Content that uses the same software and design as the rest of the site

In most cases, content you want to rank well in search engines alongside your main site belongs in a subdirectory.

Creating a subdomain in cPanel

  1. Log in to cPanel and open Domains.
  2. Click Create A New Domain.
  3. Enter the full subdomain (for example blog.yourdomain.co.uk).
  4. Untick Share document root if you want the subdomain to have its own folder, then click Submit.
    • Related Articles

    • IMAP vs POP3: which should I use?

      IMAP and POP3 are the two ways an email app can collect your mail. IMAP (recommended) Mail stays on the server and is synced to each device Read, deleted and moved messages update everywhere Ideal if you use more than one device or webmail Uses your ...
    • PHP mail() vs SMTP: what's the difference?

      Websites can send email (contact forms, order confirmations, password resets) in two ways. PHP mail() The website hands the message straight to the server's mail system. It's simple, but the email isn't tied to a real mailbox and isn't authenticated, ...
    • How to use AVIF images in WordPress

      AVIF is an image format that's often much smaller than JPEG or WebP for the same quality, helping pages load faster. Check support WordPress supports AVIF uploads from version 6.5 if the server's image library supports it. Go to Tools › Site Health › ...
    • How to use the cPanel File Manager

      File Manager lets you manage your website files from your browser, with no FTP software needed. Log in to cPanel and click File Manager in the Files section. It opens in a new tab. The left-hand panel shows your folders; the right shows the contents ...
    • How to use a custom domain with iCloud Mail

      With an iCloud+ subscription, you can use your own domain with iCloud Mail. Sign in at icloud.com, open Account Settings and find Custom Email Domain. Click Manage, choose who will use the domain and enter it. Apple shows the DNS records you need: MX ...