Skip to content

What Is A Subdomain And How To Use Them (With Examples)

What-Is-A-Subdomain

In the realm of web development and online marketing, a subdomain is an invaluable resource, proven to enhance website performance and search engine optimization—I have successfully utilized it myself.

But what exactly is a subdomain, and how can you harness its potential?

Drawing on my extensive experience in web development and digital marketing, I will clarify those questions in this blog post, covering everything you need to know to create and effectively utilize subdomains.

Quick Summary

  • A subdomain is a part of a domain name that creates separate sites within the main site, each treated as a distinct entity by search engines.
  • Subdomains are versatile, used for testing, mobile sites, country-specific sites, ecommerce stores, and boosting content relevancy.
  • Subdomains can be beneficial for SEO when a website section is entirely different from the rest of the site.

What Is A Subdomain?

A subdomain is an optional part of a domain name that allows you to divide your main site into different, completely separate sites.

Subdomain

This allows you to have complete control over the design, content, and branding of each section without affecting the others.

And the best part is that search engines treat each section as a completely separate entity.

In other words, it’s like having a second level domain registrar register multiple websites under main domain names!

A subdomain URL structure looks like this:

Prefix + Primary Domain Name

For instance, if your site is “mywebsite.com, a subdomain would be something like “support.mywebsite.com or “store.mywebsite.com.

The primary domain name is “mywebsite.com” and the top level domain names is the “.com”.

Fun fact: The famous “WWW.” that you see at the beginning of many web addresses is actually a subdomain!

Subdomain Use Cases And Subdomain Examples

1. Creating A Testing Version Of A Website

Let’s say you are a developer working on a new feature for your main site that requires you to create a subdomain.

What would you prefer:

  • Test the new feature on your public ecommerce sites and risk breaking something for your users
  • Test the new feature on a separate, testing subdomain where only you have access

If you chose (b), then you are already familiar with the benefits of using a subdomain!

A testing subdomain allows you to test new features, design changes, and plugins in a separate, controlled environment before pushing them to the live site.

It also allows developers to easily roll back changes if something goes wrong.

2. Identify And Separate Mobile Sites

Another common subdomain use case is to identify and separate mobile sites.

Mobile-Subdomain

Mobile-specific subdomains usually have “m” in them, such as “m.mywebsite.com”.

This is because mobile devices have different screen sizes and resolutions, so the website needs to be formatted differently to fit these screens.

3. Setting Up Country-Specific Websites

If you have a website that targets users in multiple countries, then you might want to create a subdomain for each country.

For example, if your main site is “mywebsite.com”, you might have a subdomain for the United Kingdom that looks like “uk.mywebsite.com”.

This allows you to easily target users in specific countries with different versions of your website.

Country Specific domain

You can also create a subdomain for each language your website supports.

For example, if your website is in English, you might create a subdomain for Spanish that looks like “es.mywebsite.com”.

4. Separate The Ecommerce Store From The Main Website

Ecommerce sites typically require setting it up on a separate subdomain.

Separate-store-subdomain

This allows you to keep your main website and online store separate, which can be beneficial for a number of reasons:

  • You can have separate site designs for each without affecting the other
  • You can use different platforms for each section of your website without affecting the other
  • You can track traffic and conversions separately in Google Analytics

5. Separate Poorly Performing Sections From The Primary Domain

While Google understands the relationship between subdomains and the master domain names, they treat subdomains as a completely different site.

Google Treating Subdomains

This is usually a good thing, but it can also be used to your advantage if you have a section of your website that is underperforming.

If there are sections of your websites that are performing poorly in the SERPs, you can isolate them from the main websites and treat them as their own subdomains.

For example, if your website has a news section where it covers the latest industry news, you might want to separate this section from the primary domain, as these news articles are usually performing poorly in the SERPs and they can cause some keyword cannibalization issues.

6. Create Keyword Rich URLs

Let’s say you are hosting affiliate website that reviews cars with the domain names “car-reviews.com”.

You could create a subdomain for each type of car, such as “honda.car-reviews.com” or “toyota.car-reviews.com”. This would help build topical relevance at the domain for “Toyota, not just “car reviews”. It would be more niche specific and less general.

A domain is an important part of web hosting and web traffic, as search engines use them to determine the content of a website.

Topical Relevance

This would be beneficial because:

  • Each subdomain can target a unique keyword for the different subdomains
  • Each subdomain can rank separately in the SERPs
  • Different subdomains are treated as separate websites, so each subdomain can have its own backlink profile

7. Boost Content Relevancy

Google prefers ranking niche ecommerce sites over general websites, as it shows that the website is an expert on that particular topic. This is a concept often referred to as topical relevance.

If you have a big website that covers many different, unrelated topics, you can use subdomains to separate each topic into its own entity.

Big-Website-With-Subdomains

For example, let’s say you want to create a huge review site that reviews everything from books to movies to cars.

You could create your own subdomain for each topic, such as “books.mywebsite.com”, “movies.mywebsite.com”, and “cars.mywebsite.com”.

This way, each subdomain would be treated as a separate “niche website” and Google would be more likely to rank it higher.

Subdomain Vs. Subdirectory

A subdirectory is a folder within your primary domain that is used to organize your website content.

A subfolder URL structure would look like this:

Domain Name + Prefix

For example, if your website was “mywebsite.co”, a subdirectory could be “mywebsite.com/support” or “mywebsite.com/cats”.

A subdomain, on the other hand, would be something like “support.mywebsite.com” or “cats.mywebsite.com”.

The main difference between subdirectories and subdomains is that subdirectories are treated as part of the domain, while subdomains are treated as separate entities.

Subdirectory-vs-subdomain

To help you better understand the difference between the two of them, think of a computer with multiple hard drives.

In this analogy, the computer is your main domain, the hard drives are your subdomains, and the folders on each hard drive are your subdirectories.

So, Which One Is Better For SEO?

Subdirectories are better for SEO because they’re part of the main domain.

This means that all the backlinks, social signals, and authority that your root domain has will also be passed on to the subdirectories.

However, there are some cases where using a subdomain is better from an SEO perspective.

The most common one would be if you have a section or a category that is entirely different than the rest of your website.

Take the New York Times, for example. They are a major publication that covers all types of news from Business and Politics to Food and Travel.

The New York Times

But they also have a section on their website where they cover food recipes and how to cook.

This is not related to news and can be considered a completely different website, so they hosted it on a subdomain.

Notice how they have 2 food-related sections on their website:

  • A food news section where they used a subdirectory because it’s related to the overall website topic (news).
  • A cooking recipe section where they used a subdomain because it’s a completely different topic (it’s recipes not news).

And that’s exactly how you should structure your website.

The New York Times - subdomain and subdirectory

To determine whether you should use a subdomain or a subfolder, ask yourself this question:

Is this section relevant to the rest of the website?

If you answered yes, then go with a subdirectory. If not, then a subdomain will be better for SEO.

How To Create A Subdomain

  • Log in to your hosting provider account
  • Go to the “Domain Manager” or “Domain Name System (DNS) Management” web page
  • Once you’re there, you’ll see a list of all the domains and subdomains that are associated with your account
  • To create a new subdomain, simply click on the “Add Domain” or “Create a subdomain” button and enter the name of your new subdomain
  • Once you’re done, click on the “Create” or “Add” button and your subdomain will be created instantly by your hosting provider

Frequently Asked Questions (FAQs)

What Is An Example Of A Subdomain?

An example of a subdomain name would be “support.mywebsite.com” or “blog.mywebsite.com”.

cloud.google subdomain

How Many Subdomains Can I Have?

You can have up to 500 subdomains per domain name.

Is A Subdomain Free?

Yes, you can create multiple subdomains for free. However, you will need to pay for a separate hosting plan for each subdomain.

Hostgator Hosting Plans

Is A Subdomain A Separate Website?

Yes, a subdomain is treated as a separate website by Google and other search engines. But search engines do understand the relationship between a subdomains and root domain.

Can I Use a Subdomain for My E-commerce Store?

Yes, you can use a subdomain for your e-commerce store. In fact, we recommend it!

Why You Should Use Subdomaines?

As you can see, subdomains can be a great way to organize your wordpress site and improve your SEO.

Just remember to use them for the right reasons and you’ll be fine.

And since subdomains need to be hosted on separate hosting provider, be sure to check out our list of the best web hosting services.

Matt-Author-Img

Article by

Matt Diggity

Matt is the founder of Diggity Marketing, LeadSpring, The Search Initiative, The Affiliate Lab, and the Chiang Mai SEO Conference. He actually does SEO too.

Want to rank easier, higher and faster?

Sign up and join 100,000+ other subscribers and get SEO test results sent straight to your inbox.

moz sidebar

"One of the most effective SEOs I've ever met"- Cyrus Sheppard

As Seen On...

Search Engine Journal
New York Post
ahrefs brand