
How does a subdomain work?
A subdomain works as an independent hostname in DNS that can point to any server, while sharing the brand and registration of the main domain. In shop.example.com, “com” is the top-level domain, “example” is the registered domain and “shop” is the subdomain label. The owner creates it with a DNS record (an A, AAAA or CNAME record), so no new domain purchase is needed. The www prefix is technically also a subdomain.
Typical uses of subdomains:
- Separate applications: app.example.com for a SaaS product next to a marketing site.
- Separate platforms: shop.example.com on Shopify while the blog runs on WordPress.
- Country or language versions: de.example.com, cz.example.com.
- Support centres and documentation: help.example.com, docs.example.com.
How does Google treat subdomains?
Google treats each subdomain as a separate site for crawling, while ranking it on the quality of its own content. The technical consequences are documented in Google Search Central:
Separate crawl budget
Google’s crawl budget guide defines a site as a unique hostname, and gives www.example.com and code.example.com as 2 sites with separate crawl budgets.
Separate robots.txt
A robots.txt file is valid only for the host it sits on. The file at https://example.com/robots.txt does not control https://other.example.com/, so each subdomain needs its own file, up to 500 KiB.
Search Console coverage
A Domain property in Search Console, verified by DNS, covers all subdomains and both http and https. A URL-prefix property covers only the exact prefix, so it suits per-market reporting, for example a separate property for de.example.com.
Subdomain vs subdirectory
Google’s SEO Starter Guide states that there is no SEO preference between subdomains and subdirectories: subdirectories may be easier to manage, and subdomains can suit distinct topics. The practical differences:
| Criterion | Subdomain (de.example.com) | Subdirectory (example.com/de/) |
|---|---|---|
| Hosting | Any server or platform | Same host as the main site |
| Crawl budget and robots.txt | Separate per subdomain | Shared with the domain |
| Internal links and authority | Need deliberate linking between hosts | Flow naturally within one site |
| Maintenance | More setup (DNS, SSL, analytics) | Lower, one codebase |
Subdomains in international SEO
In international SEO a subdomain is one of 3 recommended URL structures for country or language versions, next to a ccTLD and a subdirectory. Google lists its advantages as easy setup, freedom to host each market on a different server and easy separation of sites. Its main drawback is ambiguity: users cannot tell from de.example.com whether “de” means German language or Germany. Google confirms that a language-specific subdomain does not set the audience on its own, so every subdomain set needs hreflang annotations with full return links. Since Google removed the country-targeting setting from Search Console in 2022, a subdomain carries a weaker country signal than a ccTLD.
In my projects I choose subdomains for international versions only when a market runs on a different platform or team, for example a Czech shop on a separate Shopify instance. For a Polish e-commerce brand expanding to Germany on the same CMS, a subdirectory is almost always cheaper and builds authority faster, because links to any language version strengthen the same host.
Moving a subdomain to a subdirectory
Move a market from a subdomain to a subdirectory with a page-to-page 301 redirect map, updated hreflang and canonical tags, and a new sitemap. Redirect every old URL to its exact counterpart, not to the homepage, and keep the redirects live for as long as possible. Update the hreflang sets on all other language versions on the same day, otherwise they point to redirected URLs and Google ignores them. In Search Console, add the new folder as a URL-prefix property before the switch so you have a baseline for comparison.
Not sure whether your markets belong on subdomains, subfolders or ccTLDs? Book an international SEO consultation or an SEO audit of your current structure.
Frequently asked questions about Subdomain
Is a subdomain bad for SEO?
A subdomain is not bad for SEO, and Google's SEO Starter Guide gives no preference between subdomains and subdirectories. It does need its own robots.txt, crawl budget and internal linking, so it requires more maintenance.
Is www a subdomain?
Yes, www is technically a subdomain of the registered domain. Pick either the www or the non-www version as canonical and redirect the other with a 301.
Do subdomains share authority with the main domain?
Google crawls each subdomain as a separate site, so authority does not flow automatically. Strong internal links between the main domain and the subdomain help Google connect them.
Should I use subdomains for language versions?
Use subdomains for language versions when markets run on separate platforms or servers. For one CMS, subdirectories are easier to maintain, and both options need hreflang.
Related terms
- Managing multi-regional and multilingual sites · Google Search Central
- SEO Starter Guide · Google Search Central
- Large site owner's guide to managing your crawl budget · Google Search Central
- How Google interprets the robots.txt specification · Google Search Central
- Add a website property to Search Console · Google Search Console Help
- RFC 1034: Domain Names, Concepts and Facilities · IETF







