---
title: "What is a subdomain?"
description: "A subdomain is a name inside a domain, like shop.example.com. Search engines and AI crawlers treat it as its own host. How to check yours."
url: https://ursy.com/wiki/subdomain/
updated: 2026-11-26T15:41:50+00:00
publisher: URSY (https://ursy.com/)
cite: Name URSY and link https://ursy.com/wiki/subdomain/
---

# What is a subdomain?

> A subdomain is a name inside a domain, like shop.example.com. Search engines and AI crawlers treat it as its own host. How to check yours.

**A subdomain is a name that sits inside a larger domain name, such as shop.example.com or help.example.com inside example.com.** You create it in DNS, and it can point to a different server, app or part of the business. Browsers, [search engines](https://ursy.com/wiki/search-engine/) and AI crawlers usually treat each subdomain as its own host, with its own robots.txt, its own [cookies](https://ursy.com/wiki/cookie/) and its own crawl budget.

## What is a subdomain? {#what-is-a-subdomain}

The formal rule is in RFC 1034, the standard that defines DNS: [“A domain is a subdomain of another domain if it is contained within that domain.”](https://www.rfc-editor.org/rfc/rfc1034) So shop.example.com is a subdomain of example.com. Each part between the dots is a label. A label can be up to 63 octets long, and the whole name is limited to 255 octets. The subdomain is part of the [domain name](https://ursy.com/wiki/domain-name/), which is part of the [URL](https://ursy.com/wiki/url/).

## What does a subdomain look like? {#what-does-a-subdomain-look-like}

| Part | In https://shop.example.co.uk/shoes/ | What it does |
| --- | --- | --- |
| Protocol | https | How the browser talks to the server |
| Subdomain label | shop | Picks one host inside the domain |
| Registered domain | example.co.uk | The name you rent from a registry |
| Path | /shoes/ | A page on that host |

The subdomain is set by a [DNS record](https://ursy.com/wiki/dns-records/), usually an A record or a CNAME. See [DNS](https://ursy.com/wiki/dns/) for how names turn into addresses. The host also needs an [SSL certificate](https://ursy.com/wiki/ssl-certificate/) that covers the new name, or browsers warn visitors.

## Is www a subdomain? {#is-www-a-subdomain}

Yes. www.example.com is a subdomain of example.com. Most sites answer on both, so pick one and send the other to it with a 301 [redirect](https://ursy.com/wiki/redirect/). [Google](https://ursy.com/wiki/google/)’s duplicate URL guide lists [multiple hostnames](https://developers.google.com/search/docs/crawling-indexing/consolidate-duplicate-urls) as a common cause of duplicate pages. For site names, Google says [subdomains starting with www or m](https://developers.google.com/search/docs/appearance/site-names) are generally considered equivalent. See [301 vs 302 redirect](https://ursy.com/wiki/301-vs-302-redirect/) and [canonical tag](https://ursy.com/wiki/canonical-tag/).

## Subdomain or subfolder? {#subdomain-or-subfolder}

A subfolder is a path on the same host, such as example.com/shop/. Google’s guide to sites for many countries compares the two. It lists subdomains as [“Easy to set up”](https://developers.google.com/search/docs/specialty/international/managing-multi-regional-sites), allowing different server locations and easy separation of sites. It lists subfolders as low maintenance on the same host, with separation harder. Google does not say one ranks better. Its [SEO starter guide](https://developers.google.com/search/docs/fundamentals/seo-starter-guide) says: “From a business point of view, do whatever makes sense for your business.” The real difference is the work each one creates.

| Job | shop.example.com | example.com/shop/ |
| --- | --- | --- |
| robots.txt | Needs its own file | Shares the main file |
| Crawl budget | Separate | Shared |
| Site name in Google | Can have its own | Uses the domain’s |
| Different server or app | Easy | Harder |
| Internal links | Cross-host links to set up | Normal internal links |

## Why does a subdomain matter for search? {#why-does-a-subdomain-matter-for-search}

Search engines draw the line at the host. Google’s robots.txt rules [apply only to the host, protocol and port](https://developers.google.com/search/docs/crawling-indexing/robots/robots_txt) where the file sits. A file at www.example.com/robots.txt is only valid for that subdomain. Google’s crawl budget guide says its [crawling infrastructure defines a site as a unique hostname](https://developers.google.com/search/docs/crawling-indexing/large-site-managing-crawl-budget), so two subdomains have separate [crawl budgets](https://ursy.com/wiki/crawl-budget/). Each subdomain also needs its own [robots.txt](https://ursy.com/wiki/robots-txt/) and a sensible [XML sitemap](https://ursy.com/wiki/xml-sitemap/).

## Why does a subdomain matter for AI answers? {#why-does-a-subdomain-matter-for-ai-answers}

An [AI crawler](https://ursy.com/wiki/ai-crawler/) such as [GPTBot](https://ursy.com/wiki/gptbot/) or [ClaudeBot](https://ursy.com/wiki/claudebot/) meets the same host line. If you allow AI crawlers on www but forget help.example.com, your most useful answers may never be read. The llms.txt proposal puts the file [at the root path /llms.txt](https://llmstxt.org/) of a website, so a help centre on its own host needs its own [llms.txt](https://ursy.com/wiki/llms-txt/). Google also says a page must be [indexed and eligible to be shown with a snippet](https://developers.google.com/search/docs/appearance/ai-features) to be a supporting link in AI Overviews or AI Mode. A blocked subdomain has no route into [AI Overviews](https://ursy.com/wiki/ai-overview/). For [answer engine optimisation](https://ursy.com/wiki/answer-engine-optimisation/), check every host that holds content you want quoted.

## How does Search Console see subdomains? {#how-does-search-console-see-subdomains}

[Google Search Console](https://ursy.com/wiki/google-search-console/) has two kinds of property. A Domain property [includes all subdomains](https://support.google.com/webmasters/answer/34592) (m, www and so on) and both http and https, and you verify it with a DNS record. A URL-prefix property only covers addresses that start with that exact prefix, so https://m.example.com/ is not in https://example.com/. If you track only the www prefix, a help centre or shop on another host is missing from your reports.

## What about cookies and analytics? {#what-about-cookies-and-analytics}

Cookies follow the host too. MDN explains that if a cookie [omits the Domain attribute](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Set-Cookie), it is returned only to the host that sent it. If Domain is set, subdomains are always included. Browsers also treat a different host as a different origin: [store.company.com and news.company.com](https://developer.mozilla.org/en-US/docs/Web/Security/Defenses/Same-origin_policy) are not the same origin. So a visit that starts on www and ends on shop can look like two visits: the [session](https://ursy.com/wiki/session/) splits, and the shop may show your own site as the [referrer](https://ursy.com/wiki/referrer/). Set up your analytics so every host reports into one place. See [first-party cookies](https://ursy.com/wiki/first-party-cookies/), [cookieless analytics](https://ursy.com/wiki/cookieless-analytics/) and [cookie banners](https://ursy.com/wiki/cookie-banner/), which you need on every host that sets cookies.

## Can a subdomain hurt your site? {#can-a-subdomain-hurt-your-site}

Yes, in three ways:

- **Spam on your name.**  Google’s spam policies name [using existing or new subdomains](https://developers.google.com/search/docs/essentials/spam-policies) to keep breaking its rules as policy circumvention. Renting a subdomain to someone else’s low-value pages can fall under [site reputation abuse](https://ursy.com/wiki/site-reputation-abuse/).
- **Takeover.**  MDN describes a [subdomain takeover](https://developer.mozilla.org/en-US/docs/Web/Security/Attacks/Subdomain_takeover): a CNAME still points to a service you closed, and an attacker claims it and serves their own content on your name.
- **Leaks.**  A staging or test subdomain left open gets crawled and indexed, and creates [duplicate content](https://ursy.com/wiki/duplicate-content/).

## What are the common mistakes? {#what-are-the-common-mistakes}

- One robots.txt on www, none on the other hosts.
- Both example.com and www.example.com answering with a 200, with no redirect.
- A staging host with no [noindex](https://ursy.com/wiki/noindex/) and no login.
- Old DNS records left pointing at closed services.
- A sitemap on www that lists URLs from other hosts without cross-site submission. Google says sitemaps in an index [must be hosted on the same site](https://developers.google.com/search/docs/crawling-indexing/sitemaps/large-sitemaps) unless cross-site submission is set up.
- No links between hosts, so the shop sits like an [orphan page](https://ursy.com/wiki/orphan-page/) next to the main site.
- Moving a blog from a subdomain into a folder without 301 redirects, so its links are lost. See [moving a website without losing traffic](https://ursy.com/wiki/move-a-website-without-losing-traffic/).

## A worked example {#a-worked-example}

A company runs four hosts. Here is what a check finds:

| Host | robots.txt | Sitemap | Indexable | Verdict |
| --- | --- | --- | --- | --- |
| www.example.com | Yes, allows search and AI crawlers | Yes | Yes | Healthy |
| example.com | Copy of www | No | Yes, 200 not 301 | Redirect to www |
| help.example.com | None | None | Yes | Add robots.txt, sitemap and llms.txt |
| staging.example.com | None | None | Yes | Add login or noindex now |

The help centre holds the answers people ask AI about, yet nothing guides crawlers to it. The staging host is the bigger risk: it can be indexed as a copy of the live site.

## How to check it {#how-to-check-it}

1. **List every host.**  Start with your [DNS records](https://ursy.com/wiki/dns-records/) and your [SSL certificate](https://ursy.com/wiki/ssl-certificate/) names. Remove any record that points at a closed service.
2. **Check robots.txt on each host.**  Run the [Robots.txt Checker](https://ursy.com/robots-txt-checker/) once per subdomain, not once per company. Our guide [how to use the Robots.txt Checker](https://ursy.com/guides/how-to-use-robots-txt-checker/) explains the result.
3. **Check which AI crawlers each host lets in.**  The [AI Bot Checker](https://ursy.com/ai-bot-checker/) reads the rules for [GPTBot](https://ursy.com/wiki/gptbot/), [ClaudeBot](https://ursy.com/wiki/claudebot/) and others. Then run the [llms.txt Checker](https://ursy.com/llms-txt-checker/) on each host that should be quoted.
4. **Check www and non-www.**  The [Redirect Checker](https://ursy.com/redirect-checker/) shows each hop. One 301 is right; a [redirect chain](https://ursy.com/wiki/redirect-chain/) is not.
5. **Check staging is closed.**  Read the status and [X-Robots-Tag](https://ursy.com/wiki/x-robots-tag/) in the [HTTP Header Checker](https://ursy.com/http-header-checker/). Then check the page tags with the [Meta Tag Checker](https://ursy.com/meta-tag-checker/) for noindex and the [canonical tag](https://ursy.com/wiki/canonical-tag/).
6. **Check each sitemap.**  The [XML Sitemap Checker](https://ursy.com/sitemap-checker/) shows the URLs and their hosts, so you can spot a list that mixes hosts.
7. **Check the subdomain home page.**  The [Schema Markup Checker](https://ursy.com/schema-checker/) shows the WebSite markup Google reads for [site names](https://developers.google.com/search/docs/appearance/site-names). The [AI Readiness Checker](https://ursy.com/ai-readiness-checker/) scores how ready the host is for AI.
8. **Compare two hosts.**  [Compare Two Websites](https://ursy.com/compare-websites/) puts www and help side by side, check by check.
9. **Check who is really [crawling](https://ursy.com/wiki/crawling/).**  [Verify an AI Bot](https://ursy.com/verify-ai-bot/) tests one address against the published lists. The [Canonical Tag Checker](https://ursy.com/canonical-checker/) and [SSL Certificate Checker](https://ursy.com/ssl-checker/) are live.
10. **Watch every host over time.**  [Crawl budget by bot](https://ursy.com/pro/crawl-budget-by-bot/), [Bot verification log](https://ursy.com/pro/bot-verification-log/) and [Index coverage monitor](https://ursy.com/pro/index-coverage-monitor/) show where crawlers go and what gets indexed (in URSY Pro, opening in stages).

## What URSY.com counts {#what-ursy-counts}

We count every request from the edge log and the origin, including pages the cache answers, and sort each one into five visitor types. [Bot](https://ursy.com/wiki/bot-web-robot/) names are checked against the IP lists the companies publish, so a bot is marked real, fake or unknown. We keep the path, never the query string. The rules are on our [methodology](https://ursy.com/methodology/) page.

## Questions {#questions}

### Do subdomains rank worse than subfolders? {#do-subdomains-rank-worse-than-subfolders}

Google publishes no rule that says so. A subdomain is more work: its own robots.txt, sitemap, crawl budget and links. If you will not do that work, a subfolder is simpler.

### Do I pay for a subdomain? {#do-i-pay-for-a-subdomain}

No. Once you own the domain, a subdomain is just a new DNS record. You can add as many as your DNS provider allows.

### Does a subdomain share the main site’s authority? {#does-a-subdomain-share-the-main-sites-authority}

It shares the name, not the pages. Links from the main site to the subdomain help people and crawlers find it. See [internal linking](https://ursy.com/wiki/internal-linking/) and [backlinks](https://ursy.com/wiki/backlinks/).

### Do I need a new Search Console property for each subdomain? {#do-i-need-a-new-search-console-property-for-each-subdomain}

Not if you use a Domain property. It covers every subdomain and both protocols. A URL-prefix property covers one host only.

### Should my staging subdomain be blocked in robots.txt? {#should-my-staging-subdomain-be-blocked-in-robots-txt}

A login is safer. robots.txt stops crawling, not indexing, and Google can still index a blocked URL it finds through links. See [noindex, nofollow or robots.txt](https://ursy.com/wiki/noindex-nofollow-or-robots-txt/).

## Related words {#related-words}

- [Domain name](https://ursy.com/wiki/domain-name/)
- [DNS](https://ursy.com/wiki/dns/)
- [Robots.txt](https://ursy.com/wiki/robots-txt/)
- [Crawl budget](https://ursy.com/wiki/crawl-budget/)
- [International SEO](https://ursy.com/wiki/international-seo/)
- [Hreflang](https://ursy.com/wiki/hreflang/)
- [Move a website without losing traffic](https://ursy.com/wiki/move-a-website-without-losing-traffic/)
- [Technical SEO](https://ursy.com/wiki/technical-seo/)
- [Site reputation abuse](https://ursy.com/wiki/site-reputation-abuse/)

## Sources {#sources}

- [RFC 1034: Domain names, concepts and facilities](https://www.rfc-editor.org/rfc/rfc1034), checked 24 November 2026
- [Google Search Central: How Google interprets the robots.txt specification](https://developers.google.com/search/docs/crawling-indexing/robots/robots_txt), checked 24 November 2026
- [Google Search Central: Crawl budget management for large sites](https://developers.google.com/search/docs/crawling-indexing/large-site-managing-crawl-budget), checked 24 November 2026
- [Google Search Central: Site names in Google Search](https://developers.google.com/search/docs/appearance/site-names), checked 24 November 2026
- [Google Search Central: Managing multi-regional and multilingual sites](https://developers.google.com/search/docs/specialty/international/managing-multi-regional-sites), checked 24 November 2026
- [Google Search Central: How to specify a canonical URL](https://developers.google.com/search/docs/crawling-indexing/consolidate-duplicate-urls), checked 24 November 2026
- [Google Search Central: Manage your sitemaps with sitemap index files](https://developers.google.com/search/docs/crawling-indexing/sitemaps/large-sitemaps), checked 24 November 2026
- [Google Search Central: AI features and your website](https://developers.google.com/search/docs/appearance/ai-features), checked 24 November 2026
- [Google Search Central: Spam policies for Google web search](https://developers.google.com/search/docs/essentials/spam-policies), checked 24 November 2026
- [Search Console Help: Add a website property](https://support.google.com/webmasters/answer/34592), checked 24 November 2026
- [MDN: Set-Cookie header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Set-Cookie), checked 24 November 2026
- [MDN: Same-origin policy](https://developer.mozilla.org/en-US/docs/Web/Security/Defenses/Same-origin_policy), checked 24 November 2026
- [MDN: Subdomain takeovers](https://developer.mozilla.org/en-US/docs/Web/Security/Attacks/Subdomain_takeover), checked 24 November 2026
- [llmstxt.org: The /llms.txt file](https://llmstxt.org/), checked 24 November 2026
- [Google Search Central: SEO starter guide](https://developers.google.com/search/docs/fundamentals/seo-starter-guide), checked 24 November 2026

*Updated 24 November 2026 by URSY.com.*
