Subdomains Explained

Subdomains Explained

A subdomain is a domain that is attached to a root (or main domain) that can direct browser requests to specific files on a specific server.

You are currently looking at files on shivarweb.com – but more specifically, you are looking at files on the www.shivarweb.com subdomain, since I also use subdomains like app.shivarweb.com and other for experiments.

As an analogy, if a domain is like a physical address, but on the Internet, then a subdomain is like a Suite or Apartment number. Like a Suite number, they only make sense as part of the larger address, but they allow visitors to access a more more specific (and usually different) location.

That’s the short version, but there’s more to subdomains than just the definition and an analogy. I’ll cover questions like –

  • What Is a Subdomain?
  • What Is a Subdomain Used For?
  • Subdomain vs Domain
  • Subdomain vs Subdirectory
  • Subdomain Examples
  • How To Create a Subdomain

Disclosure – I receive customer referral fees from companies mentioned on this website. All data & opinions are based on my professional experience as a paying customer or consultant to a paying customer.

What Is a Subdomain

Like I wrote in Domain Names Explained, the Internet is nothing but a bunch of connected devices with IP Addresses (usually a series of numbers like 192.168.0.1). IP Addresses are not only hard to remember, but they change frequently.

A domain name is a great way to provide a memorable way to locate your information on the Internet. It’s easier to say that your website is at shivarweb.com than at 70.39.148.106

But what if you have several different Internet applications that you want to all live on your domain name? That’s where subdomains come in.

Subdomains always come before the root domain and before the top level domain (TLD). For this website, www.shivarweb.com

  • www is the subdomain
  • shivarweb is the root domain
  • com is the top level domain

A subdomain is a part of the root domain, but remains different. You can “point” different subdomains via the Domain Name System (DNS) to completely different server locations.

cPanel documentation says that it is “a subsection of your website that can exist as a new website without a new domain name.”

You can have an infinite number of subdomains and even sub-subdomains. A website can also have no subdomain. If you just see https://website.com (note that lack of anything between https:// and website) – then you are on a site with no subdomain.

That’s how companies can have their website at www.shivarweb.com and their customer portal at login.shivarweb.com and their blog at blog.shivarweb.com – these resources are all at shivarweb.com…but all in different server locations.

What Is a Subdomain Used For

A subdomain is used for providing different resources all within a single domain name, but usually the resources will need to be on a different server.

Since a domain can have an infinite number of subdomains, subdomains are often used to limit confusion, maintain a primary online brand, and cut costs (since a new domain name costs money).

For example, a small company might have an employee dashboard that they run with a 3rd party software app but they also might have a main site that they run with WordPress on their own server. They also might have a merchandise store that they run with Shopify.

All three resources need to live under the company’s domain name, but they all live in different places. They would have to setup – employee.natecompany.com and www.natecompany.com and store.natecompany.com.

Subdomain vs Domain

So what is the difference between a subdomain and a domain name? The short version is that a subdomain needs a domain name to work, but a domain name does not need a subdomain to exist.

A domain name is a core part of you and your brand on the Internet. A subdomain is more of a technical workaround. In fact, you don’t even really need the default “www” subdomain (even though it does make some technical items easier, which is why it sticks around).

As far as using a subdomain vs a domain, it’s often simply a preference. Some companies prefer to have their separate projects on separate domain names entirely. Some companies like to have a nice system of subdomains.

Subdomains can create some technical issues (ie, cross-subdomain tracking, security certificates, etc), but they also solve and simplify other issues.

It’s usually preference.

Subdomain vs Subdirectory

A subdomain is a different domain under the root domain. It appears before the root domain in the URL (ie, subdomain.domain.com.) A subdirectory is a place on a server where certain files live. It appears after the top level domain in the URL (domain.com/subdirectory/).

In an analogy, imagine your website as filing cabinets (remember those?). A subdomain would be different cabinets while a subdirectory would be a folder inside of a cabinet.

Now, there is an ongoing & complex debate on whether it’s better to use a subdirectory or a subdomain for distinct sections / campaigns / microsites.

For example, if you have a Spanish and an English language website, is it better to use es.yoursite.com & en.yoursite.com or yoursite.com/es/ & yoursite.com/en/?

Or, if you have a blog that uses WordPress (and the rest of your site uses Drupal), is it better to use blog.yoursite.com or yoursite.com/blog/?

The short, unhelpful version is that it depends on what software you are using, what your plans are, what your marketing strategy is, and what your technical skills are.

Now, based on my experience as a marketer with a focus on organic traffic & analytics, I say that unless you have a specific, firm reason to use a subdomain, then you should always default to using a subdirectory.

Why? Because Occam’s Razor – a problem-solving principle that states, “Entities should not be multiplied without necessity” or, the simplest solution is most likely the right one.

Subdomains are seem easier to implement upfront without planning. But, they introduce a lot of complexity both upfront and forever into the future. For languages, ecommerce, SEO, analytics, development, security, etc – maintaining a single website location is almost always better.

The only caveat where subdomains usually wins is online software that you want to associate with your domain…but not with your website. Customer portals, some forums, and any internal uses work better with subdomains, since subdomains inherently separate those functions from the rest of your website.

Subdomain Examples

You probably navigate among subdomains constantly and do not realize it. But here’s a few diverse examples of websites who execute subdomains well.

Wikipedia – Languages

Wikipedia

Wikipedia is a heavy user of subdomains. They have subdomains for every language, and sub-subdomains for mobile versions.

Curbed – Brand Identity

Curbed

Curbed is VoxMedia’s real estate & interior design website. Due to the nature of real estate news, they have each focus city on a subdomain with its own independent publishing software. While it is debatable from a purley SEO standpoint, it is a perfect setup to capture local interest & traffic while building a national publishing brand.

NPR – Ecommerce

NPR

NPR is a radio network, first and foremost. Their main domain NPR.org has to be 100% focused on their member stations, news & content. But, they also have merchandise that they would like to sell on their domain to serious fans. A custom Drupal setup runs their content site, but they use Shopify for their shop. This setup is a perfect example for subdomain use.

Kopywriting Kourse – Customer Portal

Kopywriting Kourse

Kopywriting Kourse covers, well, copywriting. They have an extensive free section on their blog that uses WordPress, but they also have a members’ area that runs off customized 3rd party forum software. They want members to stay on the “Kopywriting Kourse” branded site, though the members’ area lives on a subdomain.

*Disclosure – Kopywriting Kourse is a client of mine. I actually helped them setup cross-domain analytics for their subdomains. Again, it was a bit complex, but worthwhile for their specific needs. We certainly considered hosting a forum or social network on a subdirectory, but ruled it out due to their business goals, technical needs, and the spam / security risks of not using 3rd party forum software.

How To Create a Subdomain

So let’s say that a subdomain is right for you. How do you actually make that happen?

To create a subdomain, you need to go wherever your DNS records live (not your domain registration). If you have a hosting company that is separate from your domain registrar, then you’ll likely go to your hosting company.

If it’s at your hosting company, then you’ll navigate to your cPanel and/or account dashboard. There will likely be a shortcut called “subdomains” where you can select your domain and add your subdomain. You’ll need to name it, and then tell it where the software lives on your server. Here’s a screenshot from InMotion Hosting’s subdomain area.

Create Subdomain

Now, that path is simple if both websites will live on the same server. If your websites live elsewhere, then you’ll likely need to edit the DNS records directly. To do this, find where you can edit the “Zone Records”. Once again, here’s a screenshot from my account at InMotion Hosting.

Adding Subdomain

You’ll notice that there will be several records that already exist. You’ll need to add a “Record” based on the software instructions from your software provider. Usually, this will involve setting an A record and a CNAME record. It usually depends on your software’s exact setup.

Next Steps

Subdomains are a useful, but often misunderstood part of the Web. They can be a cost-effective and versatile way to make the most of your domain name, but they can also be a clunky and complex solution to common website setup issues.

Either way, be sure to understand the tradeoffs and what tradeoffs your subdomain setup involves.

The post Subdomains Explained appeared first on ShivarWeb.

“”