What is a subdomain? Definition, examples and SEO impact

A subdomain is a separate hostname created by adding a label in front of a registered domain, for example de.example.com or blog.example.com. The concept comes from RFC 1034, published by Paul Mockapetris in November 1987, which defines a domain contained in another domain as its subdomain. Each label can be up to 63 characters long, and for Google’s crawlers every subdomain is a separate site with its own crawl budget and robots.txt.

Updated: 17 October 20263 min read
Infographic: subdomain vs subdirectory comparison for SEO, hosting, crawl budget, robots.txt and authority
Source: Google Search Central, SEO Starter Guide and crawl budget guide

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:

CriterionSubdomain (de.example.com)Subdirectory (example.com/de/)
HostingAny server or platformSame host as the main site
Crawl budget and robots.txtSeparate per subdomainShared with the domain
Internal links and authorityNeed deliberate linking between hostsFlow naturally within one site
MaintenanceMore 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.

Pro tip: When you launch a market on a subdomain, link it from the main domain’s language switcher and footer on every page. Without strong internal links from the main host, a new subdomain often starts like a fresh site with no authority.

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

International SEO · AI SEO (GEO)

Grow in every market, and get cited by AI

Choosing between subdomains, subfolders and ccTLDs is the decision that shapes every later step of an expansion. I help companies pick the structure that fits their markets and tech stack, then set up hreflang so Google and AI search show each country the right version.

I help SaaS and e-commerce brands win organic traffic across Europe and the US, and get their brand recommended in ChatGPT, Gemini, Perplexity and Google AI Overviews. Every project starts with a free audit of your site, your markets and your visibility in AI answers.

Write to Adrian

Have a question about this term or your SEO?

Send a short message about your website, the markets you sell in and what you want to achieve. You get a reply from me, not from a sales team.

  • Free preliminary SEO and AI visibility audit
  • Strategy for international and multilingual markets
  • Reply within one business day
Book a free call
Adrian Dąbrowiecki

Write to Adrian

Adrian Dąbrowiecki · Marketer Coffee

Tell me about your site and your goals. I usually reply within one business day.