Subdomain or Subfolder: Which Is Better for Your Website?
You want to add a blog, a shop or a help section to your site. You can place it on a subdomain, like blog.yourdomain.com, or in a subfolder, like yourdomain.com/blog. Both work. They behave differently, and the choice matters for search and for upkeep.
The two choices
- A subdomain is a separate name in front of your domain. For example, shop.yourdomain.com. It can run a different website or application.
- A subfolder is a directory inside the same site. For example, yourdomain.com/shop. It is part of the same website.
Read our guide on creating and using subdomains for the technical side.
How search engines see them
Search engines may treat a subdomain as a separate site, though they connect it to the main domain. A subfolder is part of the main site, so its pages share the strength of the whole domain. For most business sites, content such as a blog or a help area helps the main site most when it lives in a subfolder. This is a common view, not a guarantee. Results depend on the content and on many other factors.
When a subfolder is the better choice
- You write a blog to bring visitors to your main site.
- You want all content to build one site.
- You have a small team and want one place to manage.
- You use WordPress for everything.
When a subdomain is the better choice
- The section runs on a different system, for example an online store or a customer portal.
- It needs different settings, a different server or a separate team.
- You want to separate it for safety or for control.
- It is an app, a test area or a staging copy. See WordPress staging site explained.
Set up a subdomain
- In cPanel create the subdomain and point it to a folder. Our video guide create a subdomain in cPanel shows it.
- Make sure DNS points to the right server. See DNS records explained.
- Add a certificate for it so it opens with https. See free SSL and force HTTPS.
Set up a subfolder
In WordPress, a subfolder usually comes from your permalink setup or a page structure. See permalinks and SEO friendly URLs. If it must be a separate app inside a folder, ask for help in a support ticket.
Moving later is possible, but costly
Changing from a subdomain to a subfolder, or the reverse, means every page address changes. You must add 301 redirects and update links. See redirect one domain to another for the same idea. It is easier to choose well at the start.
Do not forget the basics
Whichever you choose, give each page a clear title and a clean address, and link the pages together. Check speed with the response time checker. See core web vitals for WordPress owners.
A simple rule to start with
If you are not sure, put content that supports your main site in a subfolder, and put separate systems on a subdomain. Write down the reason for your choice. When the site grows, you can read your note and see if the reason still holds.
FAQ
Is one always better for SEO?
No. A subfolder often helps a blog, but a subdomain is the right tool for a separate system.
Can I use both?
Yes. Many sites use a subfolder for content and a subdomain for an app.
Does a subdomain need its own SSL?
It needs a certificate that covers it. A wildcard certificate can cover many. See SSL certificates.