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.
| Subdomain | Subdirectory | |
|---|---|---|
| Example | blog.yourdomain.co.uk | yourdomain.co.uk/blog |
| Treated by search engines as | A separate site | Part of your main site |
| Set up in cPanel via | Domains | Just 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
- Log in to cPanel and open Domains.
- Click Create A New Domain.
- Enter the full subdomain (for example blog.yourdomain.co.uk).
- Untick Share document root if you want the subdomain to have its own folder, then click Submit.