By Neil Patel
When navigating the internet you may notice the URL changing as you click from site to site. Sometimes you have a simple URL like www.mysite.com. Or, you might see words added before the site like this, www.shop.mysite.com.
The word “shop” in this case, is a subdomain and it’s used to differentiate the two websites from each other.
In this guide, you’ll learn what subdomains are, how you can use them, and whether or not they impact SEO.
What Is a Subdomain?
A subdomain is an addition made to a URL string to separate and organize content on a website.
Using a subdomain allows you to partition areas of the site, such as a blog or store, from the main areas of your website.
Each time you see a URL, there are essentially three main parts:
1. Top-Level Domain or TLD: This is the extension at the end. Examples would be, .com, .org, or .io.
2. Second-Level Domain or SLD: This is the creative portion of the domain. In Neilpatel.com, Neilpatel would be the second-level domain.
3. Subdomain: The subdomain in this scenario would be anything that comes before “neilpatel.” For example, if you go to app.neilpatel.com, the “app” part of the URL is what leads you to the keyword research tool, Ubersuggest. In this case, “app” would be the subdomain and it helps separate the tool from the rest of the site.
Many sites use this to create different sections for organization and user experience purposes.
If we look at the example above from Wikipedia, you’ll see they use one to differentiate the languages across their site. There are many purposes for subdomains, but they’re all used to make the experience easier and faster for the user.
Now you have an answer to “what is a subdomain.” Let’s learn how to create a subdomain.
How to Create a Subdomain
Learning how to create a subdomain is very simple and something you’ll do through your web hosting provider.
Let’s use HostGator as an example.
Step 1: Login to Your account
You’ll first login to your backend and scroll down a little until you find the section for domains.
Step 2: Create a Subdomain
Here you’ll enter the name of your subdomain and the domain you want to attach it to. In this case, I used a tennis site as an example.
Step 3: Update DNS Records
Once you’ve created the subdomain, you’ll need to add a new domain name system record or DNS. It can take anywhere from an hour to 24 hours for the changes to update and be implemented on your site so don’t expect to jump back in right away.
Subdomain vs. Subdirectory
The biggest misunderstanding is the difference between a subdomain and a subdirectory. Here is an example of a subdomain:
Now, here is an example of a subdirectory:
In the case of a subdirectory, the addition to your URL is still part of the main domain. It’s a part of the website as a whole and doesn’t tell Google that it’s anything different.
Subdomains, on the other hand, intend to stand alone, and want Google to treat them as a separate site.
Subdirectories always come after and subdomains always come before.
The big question of the subdomain vs. subdirectory debate is, which is better for SEO?
The most important thing to understand is that Google treats a subdomain as a separate entity—which means everything you do isn’t associated with the main site. All links and content are not factored into the overall domain rating of your primary domain.
This could be a good or bad thing, depending on your goal.
If you’re doing something completely different on the subdomain that could hurt the reputation of the parent domain, then it could be a good thing. If your subdomain is entirely related to the parent domain and you’re getting all your links and content on that area of the site, then it could be a bad thing.
With customer experience being one of the most important driving factors for businesses this year, I can understand why subdomains seem desirable, but Mr. Google himself has said it:
We do have to learn how to crawl[subdomains] separately, but for the most part, that’s just a formality for the first few days. – John Mueller, Google
When Should You Use a Subdomain on Your Website?
Now that you understand some of the differences between subdomains and subdirectories, here’s when you should use one over the other.
Detach From Your Main Site
In some cases, you want to create content or do something on your site but you don’t want it associated with the main page.
Adding a store to your site is a great example of this.
If we look at the image above from Nascar, we’ll see they use a subdomain for their store. This makes sense if you think about the actual purpose of Nascar.com when compared to a Nascar-related e-commerce store.
Nascar.com is trying to rank for time-sensitive news about races and drivers, while the store targets people who want to buy Nascar gear and apparel.
While they’re similar, each URL has its own purpose and should be treated separately for SEO purposes.
Subdomains help you organize your site by…