You’ve probably noticed that URLs sometimes have an extra word before the main domain name. Instead of just example.com, you might see blog.example.com or shop.example.com. That extra word is called a subdomain.

Diagram showing how a subdomain fits into a URL structure

For instance, navigating from the homepage of ‘example.com’ to the blog section might change the URL to ‘blog.example.com’. Although the URL has changed slightly, you are still on the same website. This guide will explore the part of the URL that changes, known as the subdomain, and why it is important.

Understanding Subdomains

A subdomain is an additional part added to the beginning of a domain name, allowing websites to organize content for specific functions, such as a blog or an online store, separately from the rest of the website.

A domain name usually consists of two parts: the top-level domain (TLD), which is the extension (e.g., .com, .org), and the second-level domain (SLD), which is the unique part of the domain name, often a business or brand name. For example, in ‘example.com’, ‘com’ is the TLD, and ‘example’ is the SLD.

The subdomain appears before the SLD. The most common subdomain is ‘www’, which stands for World Wide Web and contains the homepage and most important pages of a website. However, subdomains can be used to separate different sections of a website, such as ‘blog.example.com’ for the blog section and ‘shop.example.com’ for the online store.

Why Use Subdomains?

Subdomains help organize different functions of a website, making it easier for users to find what they need. For example, a restaurant chain with multiple locations could use ‘www.myrestaurant.com’ for general content and ‘nashville.myrestaurant.com’ for the menu of the Nashville, Tennessee location.

Subdomain Examples

  1. Separating Blog from Main Website: ‘www.example.com’ could focus on the main services of a company, while ‘blog.example.com’ contains articles that may not necessarily relate to the company’s products. This separation keeps everything organized and helps visitors find what they need.
  2. Localized Content: ‘www.myrestaurant.com’ could provide general information about a restaurant chain, while ‘nashville.myrestaurant.com’ provides information specific to the Nashville, Tennessee location.
  3. Different Language Versions: Wikipedia uses subdomains to denote language. For example, the ‘en’ subdomain indicates the article is in English, while ‘es’ indicates Spanish.

Creating a Subdomain

Creating a subdomain involves the following steps:

  1. Name Your Subdomain: Choose a name that describes the part of your site you are assigning, such as ‘blog’, ‘store’, or ‘support’.
  2. Log into Your cPanel: Access your hosting provider’s file manager, likely to be cPanel. Many domain registrars will have a custom interface that should be fairly easy to use to edit the DNS.
  3. Find the Subdomain Section: Go to ‘Subdomains’ or ‘Add Subdomains’ and enter your chosen subdomain, ensuring your primary domain name is selected.
  4. Create a New DNS Record: Add a DNS record pointing your subdomain to the right destination (an IP address, server name, or another domain). If you’re also setting up your XML sitemap, make sure it covers the subdomain separately.
  5. Click Create: Wait for your subdomain to resolve, which typically takes 30 minutes to 24 hours.

When to Use a Subdomain

Subdomains make sense when you need a clearly separate section of your site: a blog, an online store, a help center, or localized content for different regions. They keep things organized without requiring a whole new domain.

One thing to keep in mind for SEO: Google treats subdomains as semi-separate sites. If you want your blog content to strengthen your main domain’s authority, a subfolder (example.com/blog/) is usually better than a subdomain (blog.example.com). Use subdomains when the content genuinely needs to be independent.

Want to understand how site structure affects your rankings? Check out our SEO Mastery course for RightBlogger subscribers.