Skip to content
Booking projects for next month. Free website audit with every quote.Claim yours →

Building and hosting

What Is a Subdomain?

A subdomain is a prefix added in front of a main domain name, such as shop.example.com or help.example.com, that creates a separate section of a website. It can point to a different server or platform while still using the domain the business already owns.

What a subdomain means in plain English

If your domain, such as example.com, is a building's street address, subdomains are named entrances to that building. You create them in your domain's DNS settings without registering anything new, and each can lead somewhere different: help.example.com to a support tool, shop.example.com to a store, app.example.com to your software. Even www is technically a subdomain.

The alternative is a subdirectory, also called a subfolder, such as example.com/blog, which sits inside your main site on the same host. A subdomain behaves more like a neighboring site. Google, for instance, treats subdomains as separate sites when choosing a favicon for search results, while subdirectories share the parent site's icon.

A DNS record list for a fictional dental group with www, shop and book subdomains pointing to live services and a promo subdomain still pointing at a canceled page host.
Each subdomain is just a DNS record pointing somewhere; the risky one is the record left behind after the service it pointed to was canceled.

Why subdomains matter for your website

The choice between a subdomain and a subdirectory affects maintenance, tracking and search. Google's own comparison notes that subdomains are easy to set up, allow different server locations and keep sites cleanly separated, while subdirectories are low maintenance because everything stays on one host. That is why subdomains suit stores, help centers and apps, and subfolders usually suit blogs.

A subdomain example

A dental group keeps its main site on WordPress at example.com. Patients book through a scheduling platform that cannot run inside WordPress, so the group points book.example.com at it. Visitors stay on a familiar address, the booking tool keeps working, and the group verifies a Domain property in Google Search Console, which covers every subdomain, to see search data for both.

Common subdomain mistakes

  • Putting the blog on a subdomain only because a platform made it easy, when a subfolder would keep it inside your main site.
  • Leaving old DNS records pointing at services you no longer use, which lets attackers take over the subdomain.
  • Forgetting that each subdomain needs HTTPS coverage of its own.
  • Tracking subdomains in separate analytics setups, which splits one visitor journey into two.
  • Verifying only a URL-prefix property in Search Console and missing data from your other subdomains.

Subdomain or subfolder: which to use for each section

SectionUsual choiceWhy
BlogSubfolder (example.com/blog)Runs on the same CMS and keeps content, links and reports in one site
Store on a separate platformSubdomain (shop.example.com)The store platform needs its own DNS record and hosting
Help center or knowledge base toolSubdomain (help.example.com)Hosted help tools are usually connected with a CNAME record
Web app or client portalSubdomain (app.example.com)Separate code, deployments and security settings
Location or service pagesSubfolder (example.com/locations/austin)They share the main site's navigation, design and internal links

Copy this DNS record plan for subdomains

txt
; DNS records for example.com (zone file format)
; Main site and www
example.com.        3600  IN  A      203.0.113.10
www.example.com.    3600  IN  CNAME  example.com.

; Store on a hosted commerce platform
shop.example.com.   3600  IN  CNAME  stores.example.net.

; Online booking tool
book.example.com.   3600  IN  CNAME  clinic.booking.example.org.

; Retired service: delete records like this one, do not leave them
; promo.example.com.  3600  IN  CNAME  oldpages.example.net.

How to find every subdomain your business uses

  1. Open the Google Admin Toolbox Dig tool, type a hostname such as shop.example.com, and click CNAME, then A, to see where it points.
  2. Search your domain on crt.sh. Certificates list hostnames, so the results reveal subdomains that have ever had an HTTPS certificate, including forgotten ones.
  3. Log in to your DNS provider and list every CNAME and A record. Open each hostname in a browser; a provider error page saying the site or app does not exist marks a dangling record to delete.
  4. In a Search Console Domain property, open Performance, click Add filter, choose Page and enter a subdomain such as shop.example.com to see that section's search clicks on its own.

What good looks like: Every subdomain in DNS points to a service you still use and pay for, loads over HTTPS with a valid certificate, and none shows a provider's unclaimed or not found page.

Free tool: Google Admin Toolbox Dig

Questions to ask your web developer

“Should this section be a subdomain or a subfolder, and why?”

A good answer: A reason tied to the platform: a store or app on a separate system may need a subdomain, while a blog or service pages on the same CMS belong in a subfolder; they also explain the tracking and linking work each option adds.

“Who removes the DNS record when we stop using a service?”

A good answer: Retiring a tool includes deleting its CNAME the same day, and DNS records are reviewed on a schedule, so no subdomain is left open to takeover.

“How will analytics follow a visitor from the main site to a subdomain?”

A good answer: The same GA4 measurement ID runs on every subdomain, and they check reports for self-referrals, listing the domains under Configure your domains in the tag settings, as Google's help recommends for subdomains.

Subdomain: common questions

Is a subdomain bad for SEO?

Not by itself. Google can index and rank content on subdomains and subdirectories alike. The practical questions are tracking, internal linking and upkeep. Many owners keep a blog and service pages in subfolders so all content sits in one site, and save subdomains for separate platforms.

Do I have to pay for a subdomain?

No. Once you have registered a domain, you can create subdomains under it in your DNS settings without registering anything new. You may still pay for the hosting or software the subdomain points to, and for a certificate if your host does not include one.

Is www a subdomain?

Technically, yes. www.example.com is a subdomain of example.com. Most sites choose one version as the main address and redirect the other to it, so visitors and search engines always see a single, consistent URL for every page on the site.

Sources

Want a website that gets this right?

Every Billion Web Studio build includes technical SEO, schema and speed work as standard, with a fixed quote within 1 business day.