what-is-a-subdomain

28 / 100

What Is a Subdomain? A Beginner’s Guide

What Is a Subdomain?

A subdomain is an extension of your domain that helps you organize content and expand your business offerings.

It allows you to create standalone pages or functions, such as a blog or online store.

Understanding URL Structure

Your URL has several parts. The protocol (HTTP or HTTPS) comes before the subdomain. This is the file path that transfers data from a web server to your browser so it can load the website.

The root domain comes after the subdomain. It’s made up of two parts:

  • The second-level domain (SLD) is the name of your website (typically your brand or business name)
  • The top-level domain (TLD) is the end of your domain. For example, “.com” or “.org”
an infographic showing all parts of a URL

The most common subdomain is “www” or “world wide web.” The subdirectory  points users to the main directory of a website—in other words, where your homepage and other core pages live.

Other subdomains work to create distinct parts of a site.

For example, Google’s root domain is www.google.com. This is the address people type into a browser search bar to access Google search.

Over time, Google has grown to include a full suite of products independent of its search engine. To keep these separate, Google uses subdomains such as docs.google.com for Google Docs and ads.google.com for Google Ads.

"ads.google.com/home/" domain

Using subdomains keeps Google’s search engine free from the distraction of other products. The lack of links and unrelated content lets Google focus visitors’ attention on search, which is ultimately what they’re there for.

Google search bar

Subdomains create a separate identity, and provide an opportunity to create a unique website within a website.

For example, Google Docs and Google Ads are unique products. A subdomain lets Google use a different design and content structure to create a clear distinction between them (and other products).

Google Ads homepage

Google markets subdomains independently while keeping them under the umbrella of the primary domain that users know and trust.

Subdomains vs. Subdirectories

Subdomains and subdirectories are both smaller subsets of a root domain that let you organize website content.

But there are distinct differences.

  • A subdomain acts as another website that can use a different design or interface from the main domain
  • A subdirectory is a folder that sits inside a domain

Say you run an online pet food store and want to add a blog to give your audience tips on feeding their pets a wholesome diet.

You can add your blog as a subdirectory by creating a new page in the same way you do for a product or service.

The blog becomes a folder within your primary domain. This means it uses the same design and content management system (CMS) as the rest of your website.

When a user clicks through to your blog, the URL will look like this: www.mypetstore.com/blog

Now, let’s say your reason for creating a blog is to focus on another area of your business. For example, pet behavior training. The content is different from what’s on your main site, so it makes sense to keep it separate.

Creating a subdomain lets you create a blog on a different CMS (e.g., WordPress) with its own interface.

Your blog now sits outside of your main domain and the URL looks like this: blog.mypetstore.com 

A subdomain always sits before the root domain in the URL. A subdirectory always sits after.

Another slight difference between the two is how they affect the nested structure of your site.

With a subdirectory, you can add subfolders to the main folder that point to different categories. For example, www.mypetstore.com/blog/pets and then www.mypetstore.com/blog/pets/dogs.

Because a subdomain acts like a root domain, you can add subdirectories to your subdomain to organize pages.

For example, ads.google.com has “home” as a subdirectory. This helps to organize succeeding pages. In this case, “how it works” follows the subdirectory and creates a clear path that flows from subdomain landing page to subdirectory to content.

"ads.google.com/home/how-it-works/"

This URL structure promotes easy navigation for users and search engines.

Should You Use a Subdomain or Subdirectory?

Subdomains are best for content that is too distinct from your main website. For example, if the topic has a different purpose or requires a specific CMS or design.

The clear separation prevents user confusion and stops you from sending mixed messages to search engines about your content.

Subdirectories are best for content that is relevant to your main website.

For example, if your website is www.mypetstore.com, it makes sense to place dog food in a subdirectory (e.g., www.mypetstore.com/dog-food) as it fits with the main site.

When to Use Subdomains

Subdomains give webpages a unique identity while keeping them part of your main website. There are a few instances in which you can benefit from using them:

Creating a Blog

If your target blog topics and keywords don’t relate to the rest of your website, using a subdomain lets you engage visitors with different content.

For example, Fiverr’s main website focuses on its marketplace of freelancer services.

Its blog is a separate entity that features a variety of topics, such as company news and business tips. Fiverr hosts its blog on a subdomain, as seen in the screenshot below.

"blog.fiverr.com"

This allows Fiverr to organize its main site around the marketplace and grow its content marketing without distracting from its central selling point (freelancer services).

Adding an Ecommerce Store

A subdomain allows you to add ecommerce functionality to a website. It also lets you keep your merchandise store separate from your main offering.

Say your website started as a blog, but you’ve grown your audience to the point of selling products to monetize it.

With a subdomain, you can create an online store using an ecommerce platform (e.g., adding Shopify or WooCommerce as a subdomain of a WordPress blog).

Hubspot, for example, is an inbound marketing platform that has expanded to offer a range of branded apparel.

"shop.hubspot.com/Category"

A subdomain allows the company to market products and process transactions without having to change the code or functionality of its main site. It can also sell apparel without distracting from its main offer (marketing software).

Testing or Building a New Website

Subdomains let you test a new version of an existing website or individual pages before they go live. So you can trial new features and fix bugs without affecting the functionality of the current site.

They also provide staging platforms for new websites. For example, Squarespace’s website builder hosts newly created sites on a separate subdomain.

"cylinder-cone-fjrd.squarespace.com"

With this, users can build a website for free before committing. After a free trial ends, they can sign up to a Squarespace plan and either buy a domain or leave the site on the subdomain.

Optimizing for Mobile

Many new small business websites are responsive out of the box so that content adapts to each user’s chosen device (e.g., mobile, tablet, desktop, etc.).

But if you’re adding mobile functionality to an existing website built for desktop, a dedicated mobile subdomain makes it easier to create a tailored experience. Without having to overhaul your entire site.

Facebook, for example, defaults to the m.facebook.com subdomain for users visiting on a mobile browser.

"m.facebook.com/watch/" subdomain

Instead of simply scaling down its desktop site, Facebook uses a subdomain to create a mobile-specific version. The site mimics the functionality of its app for easy scrolling, tapping, and typing.

This removes the potential frustration of users trying to navigate a desktop site on a smaller screen, and creates a positive user experience.

It also means Facebook keeps code for the two versions of the site separate. Development teams can work on the mobile site without worrying about the effect of changes on another platform.

Targeting New Customers or Business Goals

A subdomain lets you create content for goals or audiences that differ from your main website.

Take Lyft. Its ride.lyft.com subdomain homepage is for users who want to get a ride.

"ride.lyft.com" subdomain homepage

But this page isn’t relevant to visitors who want to learn more about the company’s self-driving cars.

For this audience, Lyft uses a different subdomain landing page.

This way, it keeps different parts of the business organized. Users who want to book a ride don’t land on the site to learn about autonomous cars (and vice versa).

On autonomous.lyft.com, Lyft goes into detail on its technology without distracting from the goal of securing bookings.

"autonomous.lyft.com" subdomain homepage

Adding a Help Center or Forum

An in-depth product warrants detailed resources to help users make the most of it. Where an FAQ section can’t answer all of the questions a customer might have, a subdomain creates a dedicated platform with its own navigation structure.

Take Shopify’s Help Center. It gives users everything they need to get started, troubleshoot problems, and grow their business.

Shopify’s Help Center

By keeping domains separate, Shopify can dedicate its main site to converting potential customers, while optimizing its subdomain around keywords for current ecommerce users (e.g., “How to add products to a store” or “Using Shopify widgets”).

Reaching International Audiences

If your business is expanding into a new country, a subdomain extension gives you a space to create content specific to the new audience.

For example, Yahoo! News uses ca.yahoo.com to curate news for Canadian readers and au.yahoo.com for readers in Australia.

"au.yahoo.com" subdomain homepage

This helps Yahoo! appear more relevant and legitimate to different audiences. Content is reputable and curated from respected local sources, which gives readers more reason to trust it as a news source.

You can create as many subdomain extensions as you need for free when you own your domain name.

This makes it a more cost-effective method of reaching different audiences than buying country-specific domains (e.g., mywebsite.ca, mywebsite.au, and mywebsite.fr).

You can also use subdomains to accommodate different languages. Wikipedia, for instance, makes it easy for users to find information in their native tongue with dedicated subdomains.

For example, fr.wikipedia.org is for French speakers and ja.wikipedia.org is for Japanese speakers.

"ja.wikipedia.org" subdomain

Are Subdomains Good for Search Engine Optimization (SEO)?

A well-optimized subdomain can be as beneficial for SEO, just like any other part of your website.

Why?

Because Google understands that subdomains are part of a larger domain and can see the relationship between the two.

Google bots can find and index pages on a subdomain in the same way they do on a subdirectory.

Subdomains also have several advantages in terms of what Google looks for in an authoritative website.

With a subdomain, you can:

  • Move content away from the clutter of your main site for easy navigation
  • Reach a wider audience by targeting international markets or different topics
  • Grow authority in niche markets by going into detail on different subjects
  • Target different keywords without distracting from the main purpose of your website

People can easily find relevant content on a subdomain. This helps create a positive user experience and increases engagement.

The more time visitors spend on your site, the more Google sees it as reputable and valuable.

The result?

Pages that Google prioritizes in search rankings.

So does this mean subdomains are a better option than subdirectories for SEO?

This is subject to debate.

Subdomains vs. Subdirectories for SEO

Many SEOs favor subdirectories over subdomains.

This is because subdirectories benefit from the authority of the main domain.

When they sit on your website, new pages reap the rewards of the hard work you’ve put into earning backlinks and optimizing your existing content.

The authority from your most popular website pages filters down to the subdirectory, and allows you to achieve higher rankings and organic search performance quicker than a subdomain.

Why?

Because with a subdomain, you’re starting from scratch.

Although Google recognizes that a subdomain is a part of your primary domain, it sees it as a separate website.

This means the subdomain doesn’t benefit from the main website’s authority and vice versa.

As Google’s John Mueller explains:

You’ll need to verify subdomains separately in Search Console, make any changes to settings, and track overall performance per subdomain… We do have to learn how to crawl them separately, but for the most part, that’s just a formality for the first few days.

The video is from 2017, but the advice is still relevant today.

Essentially, you have to optimize a subdomain as though it’s a different website, which means working on a blank canvas. With no authority to leverage, seeing positive results will take longer.

And when you do eventually achieve high rankings for your subdomain, the separation means it won’t provide a boost for your primary site like good website optimization of a subdirectory will.

What it will do, however, is grow overall brand visibility and drive traffic to different parts of your business.

For this reason, subdomains are best used for SEO when content is different from the rest of your site, but you want to associate it with your brand (e.g., Lyft’s autonomous car subdomain).

This lets you optimize for new keywords to secure traffic from a specific audience.

What you don’t want to do is have a subdomain targeting the same keywords as your main site. If you do, you run the risk of cannibalizing keywords and competing against yourself in search results.

This can result in your subdomain pulling visitors away from your main website, which may be better set up to convert them.

How to Create a Subdomain

You can add a new subdomain to your root domain via the dashboard of your hosting provider.

How you do this will differ slightly depending on your web hosting interface, but the process is mostly the same across platforms.

We’ll use IONOS as an example.

First, log in to your account and access your domain settings control panel (CPanel).

For IONOS, go to “Domains & SSL” and click on your primary domain name. From the “Domain Details” page, click on “Subdomains” > “Create Subdomain.”

Navigating to “Create Subdomain” button in IONOS 

Type the name of your subdomain prefix.

Keep this related to the type of subdomain you want to create. For example, “Shop” to add an ecommerce site or “Help” for a help center.

If you’re creating a subdomain to target a new language, use the correct country code top-level domain (ccTLD). You’ll find a full list of these on the World Standards website.

This helps prevent confusion for users. It also makes it easier to keep content organized for SEO analysis and auditing.

"Create Subdomain" pop-up window

When you’re happy with your subdomain name, click “Save.”

That’s it. Your hosting provider adds the subdomain to your domain name system (DNS) settings.

It can take up to 48 hours for your domain registrar to fully implement the subdomain. Otherwise, you’re good to go.

Your new domain will appear under “Subdomains” in your domain name system (DNS) settings.

Optimize Your Subdomains with Semrush

For SEO purposes, you have to treat a subdomain as another website that you optimize alongside your primary domain and subdirectories. Semrush has several tools to ease your workload.

Organic Research

Organic Research reports tell you about your root domain’s top organic competitors and what keywords they get traffic from.

Use this to understand how other brands in your industry perform well in search and what opportunities there are for you to compete on specific keywords.

To start, type your competitor’s subdomain into the Organic Research search bar, choose your region. Then hit “Search.”

searching for "help.shopify.com" in the US in Organic Research tool

Further readingOrganic Research Overview

Position Tracking

Position Tracking lets you measure the impact of your subdomain content in daily search rankings.

Use this to learn which pages get the most traffic for your target keywords and spot pages that need improvement.

This will make it easy to prioritize where to focus your time and energy to boost your SEO.

To analyze your subdomain keywords, type your primary domain into the Position Tracking search bar, then click “Set up tracking.”

"shopify.com" entered in Position Tracking search bar

In the configuring setup, click “as Root domain.” Select “as Subdomain” and enter your subdomain URL.

"Targeting" page in Position Tracking settings

Choose your location and click “Continue to Keywords.”

Next, enter the keywords you want to track and click “Add keywords to campaign.”

Leave the box checked to receive weekly performance updates. Hit “Start Tracking” and Semrush will gather your keyword data.

"Keywords" page in Position Tracking settings

Further reading: Position Tracking Overview

Site Audit

Site Audit crawls your subdomain to analyze its health and flag any issues hampering search performance.

Use this to see where your subdomain is struggling and learn which problems to fix to improve your SEO.

Type your primary domain into the Site Audit search bar. Then, hit “Start Audit.”

"shopify.com" entered in Site Audit search bar

In the “Configure basic settings” tab of the Site Audit Settings pop-up, click the pencil icon next to “Crawl scope.”

Change your domain name to your subdomain. Then, hit “Update.”

"Site Audit Settings" page

If you want to make your audit more specific, you can customize the limit of pages to check, and allow or disallow URLs in Step 3 of the setup. Otherwise, the tool is already configured.

Click “Start Site Audit” and the tool will scan for more than 140 common issues, ranked by priority and importance.

Further reading: How to Perform a Complete SEO Audit

Use Subdomains to Engage Different Audiences

If you’re diversifying your offer or expanding into new markets, a subdomain creates an extension of your main site that you can customize for a specific audience.

Adding a subdomain is an easy task, but remember that you need to approach website optimization from the ground up in order to dominate the organic search results for your target keywords.

Use Semrush’s Organic Research, Position Tracking, and Site Audit tools along with current SEO best practices to improve your subdomain’s rankings and organic traffic.

Leave A Comment