# Subdomain

Category: [Technical SEO](https://seo-geo-glossary.com/en/glossary/category/technical-seo/) › [URLs & domains](https://seo-geo-glossary.com/en/glossary/category/technical-seo/urls-domains/)

A **subdomain** is a name placed in front of a domain, separated by a dot, for example `blog` in `blog.example.com`. It lets a site owner run a separate section under the same registered domain.

## How does a subdomain work?

Subdomains are created in the DNS settings of the domain and can point to a different server. Common uses are blogs, support portals, shops, language versions, staging environments or login areas. MDN lists the domain name as part of the URL's authority, so the subdomain sits in the host part and not in the path.

## Subdomain or subdirectory?

```
blog.example.com    subdomain
example.com/blog/   subdirectory
```

For international sites, Google describes subdomains as easy to set up with flexible server locations, and subdirectories as low maintenance (same host) but limited to a single server location. The pages read do not rank one over the other, and which fits depends on how separate the section is technically and organizationally.

## When does it matter in a migration?

Google says a Change of Address submission in Search Console applies when switching domains or subdomains. Redirects should be permanent (301 or 308) and stay active for at least a year.

Subdomains can be nested as well, as in `eu.shop.example.com`. Wildcard records (`*.example.com`) can route many subdomain names to one server (Themeisle).

## Example

```
https://www.example.com/       main site
https://shop.example.com/      shop on a subdomain
https://support.example.com/   help center
```

## Common mistakes

- **No separate robots.txt.** Rules in a robots.txt apply only to the host where the file is posted, according to Google's documentation. A subdomain does not inherit the file of the main domain.
- **Move without redirects.** When URLs change, for example from a subdomain to a subdirectory, Google advises permanent server-side redirects from the old to the new URLs.

## At a glance

- **Type:** name left of the domain, separated by a dot
- **Affects:** separate host, separate robots.txt
- **Used in:** blog, shop, support portal, language versions, staging
- **Values:** www, blog, shop
- **Docs:** [Google: multi-regional sites](https://developers.google.com/search/docs/specialty/international/managing-multi-regional-sites)

Last checked: October 8, 2026

## URL structures for country versions compared

| Structure | Example | Target country recognisable? | Pros according to Google | Cons according to Google |
|---|---|---|---|---|
| Country-code domain (ccTLD) | example.de | yes, a strong signal to users and search engines | clear geotargeting, server location irrelevant, easy separation of sites | expensive and sometimes limited availability, more infrastructure, strict ccTLD requirements in some cases, one country only |
| Subdomain on a gTLD | de.example.com | not always clear from the URL alone (is "de" the language or the country?) | easy to set up, allows different server locations, easy separation of sites | users might not recognise the targeting from the URL alone |
| Subdirectory on a gTLD | example.com/de/ | not always clear from the URL alone | easy to set up, low maintenance (same host) | users might not recognise the targeting from the URL alone, single server location, harder to separate sites |
| URL parameters | example.com?loc=de | not always clear from the URL alone | – (not recommended by Google) | URL-based segmentation difficult, users might not recognise the targeting from the URL alone |

Sources: [Google Search Central: Managing multi-regional and multilingual sites (last updated 2025-12-10)](https://developers.google.com/search/docs/specialty/international/managing-multi-regional-sites); [Search Console Help: International Targeting report (deprecated)](https://support.google.com/webmasters/answer/62399). Last checked: October 8, 2026

*Diagram: Anatomy of a URL.* A URL broken into its parts. RFC 3986 defines scheme, host, path, query and fragment. Only the browser evaluates the fragment after #, it is not sent to the server.

## Not to be confused with

- [Subdirectory](https://seo-geo-glossary.com/en/glossary/subdirectory/index.md): is a path segment after the domain, such as example.com/blog/, and sits on the same host. The robots.txt of the main domain applies to it.

## Related terms

- [Subdirectory](https://seo-geo-glossary.com/en/glossary/subdirectory/index.md)
- [Domain](https://seo-geo-glossary.com/en/glossary/domain/index.md)
- [URL](https://seo-geo-glossary.com/en/glossary/url/index.md)
- [hreflang](https://seo-geo-glossary.com/en/glossary/hreflang/index.md)

## Sources

- [Managing multi-regional and multilingual sites – Google Search Central](https://developers.google.com/search/docs/specialty/international/managing-multi-regional-sites)
- [What is a URL? – MDN Web Docs](https://developer.mozilla.org/en-US/docs/Learn_web_development/Howto/Web_mechanics/What_is_a_URL)
- [Site moves with URL changes – Google Search Central](https://developers.google.com/search/docs/crawling-indexing/site-move-with-url-changes)
- [What Are Subdomains? – Themeisle (secondary)](https://themeisle.com/blog/what-are-subdomains/)
- [robots.txt specifications – Google Search Central](https://developers.google.com/search/docs/crawling-indexing/robots/robots_txt)

---

Last updated: October 8, 2026
URL: https://seo-geo-glossary.com/en/glossary/subdomain/
