What's a Subdomain & How Is It Used?

Learn More About HubSpot CMS with Free Web Hosting
Lauren Farrell

Updated:

Published:

There’s a lot of ways I structure and host website content depending on the site I’m working on. A subdomain is one option, and I use it frequently for different reasons and use cases. I find subdomains most useful for separating out content from your main site that serves a very different purpose, like help centers or geographical locations.

man looking up what is a subdomain on a desktop computer

For example, you can visit hubspot.com to view and access the tools and services offered. Or, you can visit blog.hubspot.com to access the section of our website that serves blog content. Although the URL changes slightly, you’re still on HubSpot’s website, under HubSpot’s domain.

Learn More About HubSpot's CMS with Free Web Hosting

In this article, I’ll walk you through the part of the URL that does change — called the subdomain — and why exactly that is.

Table of Contents

A domain name typically has two parts: The top-level domain (TLD) is the extension, such as .com or .org, and the second-level domain (SLD) is the unique part of the domain name, often a business or brand name. In the hubspot.com example, com is the TLD and hubspot is the SLD.

Free Web Hosting with HubSpot

Host your website on a fully managed and optimized infrastructure that scales with your business.

  • Fully managed hosting
  • No setup required
  • No storage, traffic, or usage hosting fees
  • Keep your website secure

The subdomain is what goes before the SLD. The most common subdomain is www, which stands for World Wide Web. This subdomain contains a website’s homepage and its most important pages. The www subdomain is so widely used that most domain registrars include it with domain name purchases.

That being said, I’ve witnessed more and more websites drop the “www” prefix in favor of “https://websitename.com” directly.

Pro tip: If you’re doing this and dropping the “www” I recommend making sure that the “www” subdomain redirects to your website, since people still frequently use it to type in a web address.

Subdomains are also commonly used to separate a section of a website from the main site. For example, blog.hubspot.com and shop.hubspot.com direct to our blog and online store respectively.

When we group our domain name and subdomain with a protocol at the beginning (HTTP or HTTPS for websites) and an optional file path at the end, we have a complete URL:

infographic showing different parts of web address

Think about it this way: If I’m hosting a party, I need to provide guests with my address. The TLD would be the city I live in while the SLD would be my number and street name. If I live in an apartment building, I need to get even more specific so my guests know which apartment to ring. My apartment number would be akin to a subdomain — a specific section of the greater building that's dedicated to my living space.

Let’s take a look at some specific use cases to explain further.

1. Organizing Your Website Content

Over time, websites can get extremely large. Some brands find themselves trying to create content for multiple product suites, target audiences and purposes. Subdomains are almost like separate websites that just share a common main domain. So, they’re a good way to separate things out for clarity.

Not only does this make it easier to plan and manage your website but it can provide a far better user experience, too. Visitors can more easily find the information that’s relevant to them and navigate your content more easily.

Good examples would be a community you’re building for your target audience. Support centers and knowledge hubs are also frequently kept on subdomains.

Pro tip: I usually recommend subdomains for these website sections because it means I can take advantage of full navigation space in the subdomain’s website menu and build user flows that are unique to that space. Ultimately, I find this benefits engagement rates and conversions on both your main site and subdomains.

2. Ecommerce and Digital Products

For some websites, having an online store might be a separate revenue stream, but not the main purpose of your business.

For example, YouTube content creators might primarily make money through ad revenue on their content. But they often sell branded merchandise, too. In those instances, it would make sense to carve out your online store as a separate subdomain (e.g., store.yourwebsitename.com) so as not to distract from the site’s main content.

3. Geo-Specific Content

I also often use subdomains to create localized content. For example, if I’m running a website for a restaurant chain with multiple locations, customers can visit www.myrestaurant.com for all-encompassing content. Or, customers looking for the menu at a specific location like Nashville, Tennessee could access this information via nashville.myrestaurant.com.

I find this particularly useful for local SEO purposes, as the subdomain address can be added to Google Business profiles for an extra boost in localized search results, rather than relying on the main domain for all location profiles.

4. Language-Specific Content

Another common use for subdomains is language-specific content. You can use a subdomain to indicate a different language version of your website. For example, fr.websitename.com usually refers to a French language version, es.websitename.com to the Spanish version, and so on.

I find this tactic for providing language variations is becoming far less common. It can have negative SEO consequences, and there are other more up-to-date ways you can provide language variations.

In general, I recommend using subfolders and “href” language tags (language tags) in your URLs rather than a subdomain. That would, in theory, look something like “www.wikipedia.org/nl-nl/” if Wikipedia had chosen that structure. The first “nl” indicates the country, while the second indicates the language of the page.

However, if you want different versions of the content itself based on language, a subdomain can make it far easier to maintain the content — particularly if you are relying on manual translation and the sites don’t exactly match from one language to the next.

5. Forums and Communities

Lots of brands are turning to community marketing as a strategy for building and engaging their audience. Since communities and forums rely on user-generated content and submissions, subdomains can be a great solution.

The purpose, functionality, layouts, and branding for this type of site often need to be very different from your main site. So, a subdomain helps to keep your forum or community hub separate from the main content and functioning properly. For example, HubSpot’s own community is hosted on community.hubspot.com.

Pro tip: A lot of SaaS brands that I have worked with are very interested in using a community to drive engagement with their brand. I have always recommended setting up a subdomain in these cases.

6. Help Sites and Knowledge Centers

Similar to a community or forum, help or knowledge centers usually serve a very different purpose than your main site. You’ll usually see things like support.websitename.com or help.websitename.com in this instance.

I always explain it by purpose and by target audience. My website is like the main floor in a brick-and-mortar Apple store. It’s where people browse through products and where sales people engage with them. But my existing customers are often marching straight for the Genius bar. They need help, and they have a clear spot within the store to go and find it.

So, why make your existing customers wade through your main website to find answers to their questions? A separate subdomain lets them cut straight to finding answers to their questions, and lets you better present the content you’ve built for that purpose.

7. Online Learning Platforms

The reasons for using a subdomain for an online academy or learning platform is a combination of purpose or target audience and functionality. Learning environments can be very different to a main website. They often need to be integrated with specific tools for things like learning content, activities, and assessments.

Hosting this type of content on your main site is a distraction for both new users and those who are there to find your learning content. A subdomain like academy.websitename.com keeps the user experience more straightforward and enjoyable all round.

Subdomain vs. Subdirectory

When I mention words like “subdomain” and “subdirectory” and “URL structure” to clients, their eyes can tend to glaze over. It’s understandable — deciding on the architecture of the site is far less exciting than approving visuals or writing fun copy. But it’s imperative to understand the difference between these terms, what they’re typically used for, and how to decide when they’re needed for your site.

I also predominantly consult on search engine optimization (SEO). If there’s one thing I’ve learned, it's that, depending on your niche, a decision like subdomain vs. subdirectory can make or break your SEO performance. Plus, once the decision is made, I know how huge a project it can be to make changes further down the line.

I’ve covered what a subdomain is (blog.yourwebsite.com, info.yourwebsite.com etc.). But what is a subdirectory exactly?

A subdirectory is, essentially, a way to categorize content on your website under your main domain and nest it under a specific URL structure. The best example I can think of would be a blog.

As I’ve mentioned, you can store your blog on a totally different subdomain (blog.websitename.com). But you’ll notice that many websites opt for a URL structure like www.yourwebsite.com/blog/this-is-the-blog-post.

In this instance, the /blog/ part of the URL is the subdirectory. The rest of the URL points to the specific blog post itself. The URL www.yourwebsite.com/blog/ would be your main blog page that lists all the articles.

This is why I, and many others, typically refer to this structure as a “subfolder.”

When should you use a subdirectory versus a subdomain?

Subdomains are typically used when the content serves a different purpose to your main content. Subdirectories, on the other hand, are used to organize content on the same domain to improve organization and user experience (and clarify your site structure for search engines).

Subdomain vs. Subdirectory

There are a few typical use cases for each, and some that can depend on the overall nature of your website.

Here are few scenarios where I would recommend a subdomain:

  • Help centers and status pages for software providers (e.g., help.yourwebsite.com or support.yourwebsite.com).
  • Community sites or forums (e.g., community.yourwebsite.com or forum.yourwebsite.com).
  • An online store separate from your main business (e.g., store.yourwebsite.com).
  • Location-based websites where the content will be different depending on the country (e.g., you offer some services in one country but not in another).

Here’s where I would recommend a subdirectory:

  • Location-based websites where the content will be the same (e.g., restaurantchain.com/us/ or onlineclothingstore.com/fr/).
  • SEO performance is a high priority.

Almost anything could apply here because subdirectories are such a common and expected method for organizing website content.

However, there are also some scenarios where I would answer “it depends”:

  • Blog content. Some websites have multiple blogs on different topics. Subdomains are a great way to divide out blog websites for very different target audiences.
  • Multilingual websites. Subdomains can sometimes dilute SEO effectiveness. In that instance, you might prefer to use subdirectories for different language versions of your site rather than subdomains.
  • Partner or affiliate portals. This is a call I would make on a case-by-case basis. If it’s beneficial for user experience to send people to a different subdomain, I would go with that option to avoid confusing your main target audience when they visit your website.

Pro tip: You can nest subdirectories underneath each other to further organize content. An example I frequently use is categorizing articles into different purposes. So your URLs might look like yourwebsite.com/articles/case-studies/. This is something else to consider before making a call between subdomains and subfolders.

Free Web Hosting with HubSpot

Host your website on a fully managed and optimized infrastructure that scales with your business.

  • Fully managed hosting
  • No setup required
  • No storage, traffic, or usage hosting fees
  • Keep your website secure

Subdomain Examples

If you’re looking to create a subdomain on your website but aren’t sure what that would look like, here are a few examples to consider.

1. Blogs

By separating the HubSpot Blog from the rest of the website, it makes it obvious to visitors where they’re located on the HubSpot website as a whole. This is helpful considering www.hubspot.com focuses on the HubSpot product line, while blog.hubspot.com contains articles that don’t necessarily relate to HubSpot products.

Separating the two from each other with a subdomain keeps everything organized and helps visitors find what they need.

blog.hubspot.com subdomain

Source

2. Ecommerce

Here’s another example: In addition to its online store that sells new products, outdoor clothing brand Patagonia also resells its used clothing through the Worn Wear program. When I visit both of these links, I see that www.patagonia.com encompasses the Patagonia store (as well as other initiatives by the brand) and that wornwear.patagonia.com is used for the Worn Wear section.

Side note: I can see that Patagonia also uses subdomains for region-specific user experiences. For example, because I’m based in Europe, I get eu.paragonia.com when I visit the homepage.

subdomain example from patagonia

3. Language-Specific Website Versions

Websites can use subdomains in other ways too, like to denote language or region. Wikipedia does this with its articles. For instance, the en subdomain means the article is written in English, es indicates Spanish, and so on.

example of subdomain in wikipedia.com

Here’s a fun subdomain trick: Try replacing the subdomain for a Wikipedia article with simple. You may see a simplified English version of the article for those learning the language and those with different needs.

4. Academy

Lots of businesses offer learning centers, sometimes with free content and sometimes with paid courses. I see this a lot with software providers, especially those whose product suite is now complex enough that training courses can help with adoption and user engagement.

In those instances, it’s common to host that academy on a separate subdomain. For example, Atlassian hosts their academy on university.atlassian.com:

subdomain example from altassian

5. Knowledge Center

In a similar vein, I often recommend SaaS companies host their product knowledge hub on a separate subdomain. This content is purely for existing users and customers, so it’s helpful for everyone’s user experience to keep it separate.

I find this especially true if it’s a user-driven, community-based knowledge center. Salesforce keep this in their Trailblazer site, which also acts as their academy or learning center at trailhead.salesforce.com:

subdomain example from salesforce

Source

6. Help Center

Similarly, I think help centers are typically best kept on a subdomain. I find the content is usually managed by a separate product marketing team or even the customer success team, so it makes it easier for them to manage and update the content on a separate site.

For example, Apple keeps all its support content for customers on support.apple.com:

subdomain example from apple.com

Source

7. Community

The goal of branded communities, in my opinion, is to foster a grassroots movement of engagement. It’s a tactic that works, but it’s something that typically lives on a separate subdomain. Some brands will even choose to keep their community on a different domain entirely.

However, subdomains work perfectly for making sure that your core brand remains associated with the content and stays close to the user-generated content typically found on community sites.

For example, SAP keep their community on community.SAP.com:

subdomain example from SAP

Source

8. Charitable Initiatives

As part of social impact or DEI initiatives, lots of brands set up separate areas on their website to highlight their work in this area. It’s an important area of your brand to highlight, but there’s no doubt it can serve quite a different function to your main website content.

Starbucks has a subdomain at about.starbucks.com which hosts their corporate stories, including their impact initiatives and reports:

subdomain example from startbucks

Source

9. Geographic-Based Content

Sometimes, it’s all about location. This is a tactic I’ll occasionally recommend for companies who have a physical presence in multiple locations. Subfolders can work, too. But for content-heavy sites, subdomains can make more sense.

Craigslist is a great example. Location is hugely relevant to using their site effectively, so their subdomains are broken down by city within each country. If I was in New York, for example, I would land on ny.craigslist.com. Here is the subdomain for Madrid in Spain, which is madrid.craigslist.com:

subdomain example for craigslist

Source

10. Careers

Large organizations receive a lot of job applications across a lot of different regions. So you’ll often find the “Careers” section of a website separated onto a subdomain of the core website.

For example, Intel hosts their career portal on jobs.intel.com:

subdomain example from intel

Source

11. Product Subdomains

When you manage a ton of different software product lines but have a very recognizable brand, subdomains can be the way to go.

One of the best examples of this is Microsoft. If you’ve used their Office suite, you’ll know that different apps are accessible on subdomains like teams.microsoft.com, outlook.microsoft.com, etc.

Google is another example. They use subdomains like docs.google.com, mail.google.com and analytics.google.com for their suite of products.

Take their translation app here, which is hosted on translate.google.com:

subdomain apple from google translate

Source

Now let’s take a look at how I would go about creating a subdomain on a website so you can see the steps involved.

No matter what I want to use my subdomain for, I can create one with the help of my web hosting provider.

For example, Content Hub makes it easy to host your content on one subdomain per content tool you use (e.g., blog, landing page, website page) for one brand domain. You can also avail of a free custom domain connection without upgrading to a paid plan.

Pro tip: It’s important to note that these features are specific to HubSpot’s CMS. So, keep in mind as I work through the following steps that they may differ slightly depending on your service.

1. Name your subdomain.

First, I think of a subdomain name that best fits the section of the site I’m assigning. Common subdomains include blog, store, shop, support, help, and events.

There’s no need to overthink this — pick a name that succinctly describes this part of your site, and limit it to one word if you can. That way, your URL will look clean and familiar to visitors, even with the extra name tacked on.

2. Log into your cPanel.

To begin creating my subdomain, I log into my hosting provider’s file manager, which is likely to be cPanel. Every hosting provider has a unique login and setup for their cPanel, but the screen will look something like this.

cpanel interface

Source

3. Navigate to and enter your subdomain.

Now I’ll navigate to Subdomains or Add Subdomains. Here I can begin to enter my subdomain of choice. I add the subdomain, and make sure my primary domain name is selected as well.

creating a new subdomain in cpanel

Source

4. Create a new DNS record.

Once the domain is created, I’ll need to add a new domain name system (DNS) record. I navigate to DNS and select Add (or a similar command).

Then, I select what I want my subdomain to connect to, whether it’s an IP address, an IP address connected to the destination hostname, a server name, or a wildcard domain.

creating a new DNS name for subdomain

Source

5. Click Create and wait for your subdomain to resolve.

Finally, I click Create, or a similar command, and wait for my subdomain to resolve. It typically takes anywhere from 30 minutes to 24 hours for a subdomain to be implemented and functional on a website.

Add a subdomain to your site.

When it comes to subdomains, I recommend thinking through the decision carefully before taking action. Once implemented, it can be tricky and time-consuming to move all your content and URL structures back over to your main site.

My main recommendation would be to think about the core purpose of creating the subdomain. Are you considering the user experience? Is the content so different from the main site that it’s necessary to keep them separate? If the answer is “yes” and a subdomain makes sense to you, then go for it.

All in all, creating a subdomain is a straightforward enough process to implement and can provide your users and your content managers with a much better experience.

Editor's note: This post was originally published in February 2020 and has been updated for comprehensiveness.

Free Web Hosting with HubSpot

Host your website on a fully managed and optimized infrastructure that scales with your business.

  • Fully managed hosting
  • No setup required
  • No storage, traffic, or usage hosting fees
  • Keep your website secure
Topics: Web Hosting

Related Articles

Learn More About HubSpot's CMS with Free Web Hosting

GET HUBSPOT'S CMS SOFTWARE

CMS Hub is flexible for marketers, powerful for developers, and gives customers a personalized, secure experience

START FREE OR GET A DEMO