Glossary · ENCheck a domain

Subdomain

A subdomain is a domain name within a larger domain in the Domain Name System (DNS). In shop.example.com, shop.example.com is below example.com in the DNS name hierarchy, so it is a subdomain of example.com.

How do you recognize a subdomain?

Domain names are made of labels separated by dots. In shop.example.com, the labels are shop, example, and com. Read from right to left, each label adds a more specific name. The complete name shop.example.com is a subdomain of example.com; example.com is itself below com in the DNS hierarchy. In everyday website setup, people usually call the added name before their registered domain a subdomain.

The word “subdomain” describes a relationship between DNS names. It does not mean that the name must have its own separate registration. A person who controls example.com can usually create names below it by adding DNS information or giving another administrator responsibility for part of the DNS. The available choices depend on their DNS provider and configuration.

What can a subdomain be used for?

A subdomain can help direct different services to different places. For example, Alex’s portfolio at example.com could have a shop at shop.example.com and a help area at help.example.com. DNS settings can direct those names to the services that provide the shop and help pages. The names share the ending example.com, but they can lead to different content or systems.

Creating a subdomain does not automatically create a website or email service. A service still has to answer requests for that name. For example, shop.example.com can appear in a web address only after a shop service is available and the relevant DNS and website settings are in place.

How is a subdomain different from a path in a URL?

In https://shop.example.com/products, shop.example.com is the host name and /products is the path. A host name is part of the address used to reach a service; a path identifies a resource within that service. https://example.com/shop has a path called /shop, but it does not use the subdomain shop.example.com. The two addresses may show similar-looking content, but the names are configured in different parts of the web address.

Is www a subdomain?

Yes. In www.example.com, www is a subdomain label under example.com. Many sites make both example.com and www.example.com lead to the same pages, but they are different host names and must be configured accordingly. A site may also send visitors from one address to the other with a redirect.

Related terms