Free, independent guides since 2010

Hosting & domains

Subdomains or subfolders: what is best for your website?

When to use a subdomain (blog.example.com) or a subfolder (example.com/blog), the effects on SEO, hosting, cookies and maintenance, and common use cases.

<guide section="Hosting & domains" type="article" read="1 min"/>

Adding a blog, shop or help centre to your website raises a question: blog.example.com or example.com/blog? Both work technically, but they have different consequences.

The difference

Subfolder (example.com/blog)Subdomain (blog.example.com)
SEOShares authority and internal links directlyBuilds its own reputation, linked from the main site
HostingSame server or a reverse proxyCan run on a completely different platform
AnalyticsOne propertyNeeds cross-domain setup in some tools
Cookies and loginsShared by defaultSeparate unless configured
Brand perceptionClearly part of the main siteCan feel like a separate service

When a subfolder is best

  • Blogs and content hubs that should strengthen the main site.
  • Language versions (see multilingual SEO).
  • Service or product categories.

When a subdomain makes sense

  • A separate application: customer portal, web app, status page.
  • A hosted platform you cannot put in a subfolder, like a shop or help-desk service.
  • Very different audiences or brands under one domain.
  • Test and staging environments (staging.example.com, blocked from indexing).

Planning your domain strategy? See also one big site or many small sites.

Frequently asked questions

Does Google treat subdomains as separate websites?

Google says it can handle both, and that subdomains are not automatically penalised. In practice, content in a subfolder benefits more directly from the main site’s reputation and internal links.

Can I move a blog from a subdomain to a subfolder?

Yes, with one-to-one 301 redirects for every URL. See our guide on moving a website without losing rankings.