What Is a Subdomain and When to Use a Folder Instead
Someone sets your new blog up at blog.yourcompany.com because that is the button the hosting panel offered first, and for a year nothing looks wrong.

Someone sets your new blog up at blog.yourcompany.com because that is the button the hosting panel offered first, and for a year nothing looks wrong. Then you notice the posts rank for almost nothing, the padlock went missing on them sometime in April, and Search Console lists two properties where you expected one.
The subdomain question gets argued like doctrine and decided like a coin toss. It deserves neither. It is a hosting decision with four or five mechanical consequences you can predict in advance, plus one ranking consequence that is real but far smaller than either camp insists. What follows is the version I give clients before they build, not after.
The difference lives in DNS, not in your content
A folder is a directory sitting inside the same document root as the rest of your site. Put the blog in public_html/blog and it inherits everything: the same DNS records, the same certificate, the same server, the same error pages, the same login.
A subdomain is closer to a second site wearing your name. Creating one writes a fresh DNS record, usually an A record pointing at an IP address or a CNAME pointing at a hostname, and the host builds it a separate virtual host with its own document root, often something like /home/youruser/blog. That record is why a new subdomain sometimes answers for you and not for a colleague on another network for the first half hour. The reasons behind that delay are the same ones covered in why a new domain takes time to resolve.
Both can serve identical pages. The choice decides who maintains what, which is the part that bites eighteen months later.
What quietly breaks on a subdomain
None of these are fatal. All of them are work, and the work is invisible when you make the decision.
Certificates. A standard certificate covers yourcompany.com and www.yourcompany.com. It does not cover blog.yourcompany.com. Hosts that issue free certificates automatically usually catch the new subdomain on their next renewal sweep, and usually is doing a lot of carrying in that sentence. A wildcard certificate solves it permanently, but the free wildcard route needs DNS based validation, which means your host has to support writing a TXT record automatically. Two of the four budget hosts I checked last spring still do not.
Double the maintenance. A second content system on the subdomain is a second set of updates, a second backup schedule, a second admin password, and a second thing to patch the week a vulnerability lands. On shared hosting it also doubles your file count, which matters because inode limits are real and arrive without warning.
Search Console bookkeeping. A URL prefix property for yourcompany.com will not report on the subdomain at all. You either add a second property or switch to a Domain property, which needs a DNS verification record. Plenty of owners discover this only when they go looking for blog data and find an empty graph.
Navigation drift. This is the expensive one, and it has nothing to do with technology. Folder pages tend to end up in the main menu because they feel like part of the site. Subdomain pages tend to get one link from a footer, because the two properties feel separate to the people editing them. Six months on, the blog has forty pages and two paths in.
The ranking argument, and why both camps overstate it
You will read that a subfolder inherits your domain authority and a subdomain starts from zero. That is a tidy story about a number that search engines do not publish and do not calculate the way the story implies. Google's own position, repeated for years, is that it can handle either arrangement, and sites with huge subdomain structures rank perfectly well.
You will also read the opposite, that the choice is cosmetic. That is not true either, just not true for the reason usually given.
The folder wins in practice because of what people do, not what crawlers compute. A folder page is one more page in a site that already gets crawled daily, already has a sitemap you maintain, and already has a menu that someone updates. A subdomain quietly becomes an orphan with a logo. Discovery, internal linking and consistent templates are the whole mechanism.
I moved a client's blog from a subdomain into /blog/ in 2023 and organic sessions rose roughly 18 percent across the following four months. I also rebuilt the navigation and added about sixty internal links in the same fortnight, so I cannot hand you that figure as evidence for the move itself. Anyone who quotes you a clean percentage for this change is quoting a migration that did several things at once.
When a subdomain is genuinely the better answer
Some of these come up constantly, so here is the short version with the reasoning attached.
| Situation | Use | Why |
|---|---|---|
| Shop runs on a hosted cart platform | shop.yourcompany.com | The platform cannot serve from your folder without a reverse proxy |
| Web app on a different stack or server | app.yourcompany.com | Separate deploys, separate uptime, separate scaling |
| Help desk or docs from a SaaS vendor | help.yourcompany.com | Vendor supports a CNAME and nothing else |
| Staging copy of the site | staging.yourcompany.com | Must stay out of the live tree and out of the index |
| Blog, services, case studies, about | Folder | Same team, same template, same menu |
| Country site with its own team and content | Either, pick one and stay | Consistency matters more than the format |
The staging row has a trap worth naming. A staging subdomain with no password gets indexed, and then you have two copies of every page competing. Password protection at the server level is the fix, and the practicalities sit in running a staging site on shared hosting.
If your answer is the fifth row, which it is for most small sites, use the folder and stop reading the debate.
Moving an existing subdomain into a folder
Write down every live URL first. Export them from your sitemap, your analytics and your server log, then merge the three lists. The log catches pages the other two miss, usually old posts that still receive links.
Map one to one, with no clever consolidation. Every old address needs exactly one new address. Redirecting nine posts to a category page is how traffic disappears, and it reads as a soft removal to a crawler.
Redirect at the server, not in a plugin. Server level rules answer before any application code runs, so they survive a theme change and cost nothing per request. The syntax and the common mistakes are in setting up 301 redirects. Test ten of them by hand before you announce anything.
Leave the subdomain resolving. Do not delete the DNS record once the redirect is live. It needs to keep answering for as long as anything points at it, which is to say indefinitely. Removing it in month three throws away every link you were trying to keep.
Update internal links in the content, not just the menu. A redirect chain works, but it spends a request on every click, and old body links are the ones people forget. Search your database for the old hostname and fix what it returns.
Then wait eight weeks before judging it. Rankings wobble for a month after any address change. I have watched owners roll a migration back in week three, which is the worst possible moment, because the dip is usually at its deepest just before it recovers.
One step for this week: open your hosting panel and check whether your current certificate actually lists every hostname you serve. If any subdomain is missing from it, that is a padlock waiting to vanish.
FAQ
Is a subfolder better than a subdomain for SEO?
Usually, though not for the reason most articles give. The folder benefits because it sits inside a site that already gets crawled and already has internal links. If you would give the subdomain the same menu placement and the same linking, the gap narrows to almost nothing.
Do I need a separate SSL certificate for a subdomain?
You need coverage for that hostname, which is either a new certificate, the subdomain added to the existing one, or a wildcard. Automatic issuance from your host often handles it, but confirm rather than assume, because the failure shows up as a browser warning on every page.
Does www count as a subdomain?
Technically yes, which is why certificates list it separately. In practice search engines treat www and the bare domain as the same site once you redirect one to the other, so it is not the same decision at all.
Can I have a folder on a different server than the main site?
Yes, with a reverse proxy sitting in front of both. It is the arrangement large sites use to keep a shop or an app inside a folder, and it needs someone comfortable editing server configuration. Shared hosting rarely allows it, which is why the basics of how the pieces fit together are worth reading before you commit to a structure.
More in Web Basics
Web Basics
What Website Bandwidth Limits Actually Mean for You
Your host emails to say you have used 82 percent of your monthly bandwidth, and it is only the 14th.
Web Basics
What HTTP Status Codes Mean and Which Ones Matter
A reader emailed me in September because his hosting support had replied to a ticket with the sentence "the origin is returning...
What Is a Favicon and How to Add One to Your Website
Your website looks finished, but in the browser tab it still shows a blank grey page icon, or worse, the logo of the website...