Guides /Domains
Domains

Subdomains vs Subdirectories for WordPress: Which Is Better for SEO?

April 5, 20256 min readHostBible Team

Should your blog live at blog.yourdomain.com or yourdomain.com/blog? Should your store be at shop.yourdomain.com or yourdomain.com/shop? This question comes up constantly for businesses expanding their WordPress site, and it has a clear answer for most situations. The short version: subdirectories are almost always better for SEO. Here's why, and when subdomains are the right call despite that.

How Google Treats Subdomains vs Subdirectories

Google has historically treated subdomains as separate websites from the root domain. This means links pointing to blog.yourdomain.com don't automatically pass their authority to yourdomain.com, and vice versa. The subdomain has to build its own domain authority from scratch. Google's representatives have said the search engine is "getting better" at associating subdomains with their parent domains, but the practical evidence from SEO professionals consistently shows subdirectories rank faster and stronger for new sections of established sites.

A subdirectory (yourdomain.com/blog) is treated as part of the same website. Every blog post contributes to the domain's overall authority. Inbound links to any blog post directly strengthen the root domain and all other pages on it. For a small business trying to rank for competitive terms, pooling authority this way is a meaningful advantage.

The SEO Case for Subdirectories

The most compelling evidence for subdirectories is practical: move a subdomain blog to a subdirectory, and organic traffic typically increases by 20–100% within 3–6 months, with no new content required. This is not a theoretical difference, it's been observed across hundreds of site migrations by SEO professionals, and several major publications have documented the uplift after making the switch.

Internal linking also works more naturally within a subdirectory structure. When your blog at yourdomain.com/blog links to your product page at yourdomain.com/services, that's a standard internal link passing authority within the same site. If the blog were a subdomain, that same link is technically a cross-domain link, which carries less weight and requires separate crawl budget from Google's perspective.

When Subdomains Are the Right Choice

Entirely different products or audiences. If you're launching a SaaS app alongside an informational website, app.yourdomain.com makes sense. The app and the marketing site serve different purposes and are likely built on different technology stacks. Treating them as separate entities in DNS and server configuration is appropriate.

Different languages or regions. fr.yourdomain.com or de.yourdomain.com for language-specific sites is a valid approach, though Google also supports subdirectories (yourdomain.com/fr/) and country-code TLDs (yourdomain.fr) for international targeting. The subdomain approach is fine here, Google's international SEO guidelines explicitly support it.

Technical isolation requirements. If a section of your site needs to run on completely different server infrastructure, a different CMS, different security zone, or different SSL policy, a subdomain allows total separation. Hosting staging.yourdomain.com on a different server from production is cleaner as a subdomain than as a subdirectory.

Setting Up a WordPress Blog in a Subdirectory

If your main site is at yourdomain.com and you want to add a blog at yourdomain.com/blog, the cleanest WordPress approach is to install WordPress in a /blog subfolder, then configure the WordPress site URL and permalink settings to match. In a standard cPanel setup: create a folder called blog in your public_html directory, install WordPress there, and set the WordPress Address to https://yourdomain.com/blog.

If your main site is also WordPress, WordPress Multisite (network mode) lets you run multiple WordPress sites under one installation, with blog-style sites as either subdomains or subdirectories. Subdirectory mode is the better SEO choice and is simpler to configure on most shared hosting environments.

Setting Up a Subdomain in WordPress

To create a subdomain, you need to add a DNS record for it and then configure your hosting to point requests for that subdomain to the correct directory. In cPanel, go to Domains > Subdomains. Enter the subdomain name (e.g., blog), select the domain, and cPanel creates both the DNS record and the document root directory automatically. Then install WordPress (or copy your existing WordPress installation) to that directory.

The subdomain will need its own SSL certificate. If you're using cPanel with AutoSSL or Let's Encrypt, this happens automatically when the subdomain is created. If you're managing SSL manually, add the subdomain as an additional SAN (Subject Alternative Name) on your existing certificate or get a wildcard certificate (*.yourdomain.com) that covers all subdomains.

Migrating From a Subdomain to a Subdirectory

If you already have a blog or store on a subdomain and want to migrate to a subdirectory for SEO, plan the migration carefully. Set up 301 redirects from every old URL at the subdomain to the equivalent URL at the new subdirectory location. For example, blog.yourdomain.com/how-to-do-x should redirect to yourdomain.com/blog/how-to-do-x.

After migration, update your sitemap and resubmit to Google Search Console. Monitor your rankings and organic traffic over the following 4–8 weeks. Expect some initial volatility as Google re-crawls and recalculates authority, this is normal. In most cases, traffic recovers and exceeds the pre-migration level within 3–6 months as the consolidated authority takes effect.

Flexible Hosting for Your WordPress Setup

HostBible hosting supports unlimited subdomains, WordPress multisite, and subdirectory WordPress installations, configure your site structure exactly how you need it.

Search Domain Names