Domains, Subdomains and Subdirectories

Posted in Notes on 3 March 2015

This post has been archived

The content of this post has not been updated since 2015, and may be out of date. Extra care should be taken with any code provided.

Domains, subdomains, and subdirectories are all components of the hierarchical structure used to organise content on the internet. The terms can be confusing, here's what each means:

domain.name

A domain is a unique name that identifies a website on the internet. It typically consists of two parts: the second-level domain (SLD) and the top-level domain (TLD). For example, in the domain “example.com,” “example” is the SLD and “.com” is the TLD. Domains are used to navigate to specific websites and are part of the URL that users type into their web browsers to access a website.

subdomain.domain.name

A subdomain is a domain that is part of a larger domain. It precedes the primary domain name and is separated by a period. Subdomains are often used to organise and categorise content within a domain. For example, in the URL “blog.example.com,” “blog” is the subdomain of the domain “example.com.” Subdomains can be used for various purposes, such as hosting blogs, forums, or specialised sections of a website.

domain.name/subdirectory

A subdirectory, also known as a subfolder, is a directory or folder located within another directory or folder. In the context of websites, subdirectories are used to organise content within a domain or subdomain. They are part of the URL path that follows the domain or subdomain. For example, in the URL “example.com/blog,” “blog” is a subdirectory of the domain “example.com.” Subdirectories are often used to organise different sections or types of content within a website.


  • The website’s domain name is the main address used to access the website.
  • A subdomain is the subdivision of a domain name.
  • A subdirectory or subfolder is the directory or folder located on a domain or subdomain.

Domains are the main addresses of websites, subdomains are subdivisions of domains used for organisation, and subdirectories are folders within domains or subdomains used to further organise content.

Related Notes Posts

October 2024

What's going on between WordPress and WP Engine?

The disagreement between WordPress and WP Engine has sparked considerable debate within the WordPress community and could have important implications for users of the WordPress... Continue reading

August 2024

Guide to writing a good cookie policy (UK)

A cookie policy informs website visitors about the cookies your website uses, why they are used, and how users can control them. > **The information... Continue reading

May 2024

Email and newsletter deliverability best practice

Email deliverability refers to the ability of an email to successfully reach the recipient's inbox, rather than being marked as spam or bouncing back. High... Continue reading

More Notes Posts