This article may need to be rewritten to comply with Wikipedia's quality standards. (August 2020)
In the Domain Name System (DNS) hierarchy, a subdomain is a domain that is a part of another (main) domain. For example, if a domain offered an online store as part of their website
example.com, it might use the subdomain
A Fully Qualified Domain Name consists of multiple parts. For example, the english wikipedia domain:
The Domain Name System (DNS) has a tree structure or hierarchy, which includes nodes on the tree being a domain name. A subdomain is a domain that is part of a larger domain. Each label may contain from 1 to 63 octets. The full domain name may not exceed a total length of 253 ASCII characters in its textual representation. Most domain registries only allocate a two-level domain name. Hosting services typically provide DNS Servers to resolve subdomains within that master domain.
Subdomains in this context are defined by editing the DNS zone file pertaining to the parent domain. However, there is an ongoing debate over the use of the term “subdomain” when referring to names which map to the Address record A (host) and various other types of zone records which may map to any public IP address destination and any type of server. Network Operations teams insist that it is inappropriate to use the term “subdomain” to refer to any mapping other than that provided by zone NS (name server) records and any server-destination other than that.
According to RFC 1034, "a domain is a subdomain of another domain if it is contained within that domain". Based on that definition, a host cannot be a subdomain, only a domain can be a subdomain. A subdomain will also have a separate zone file with a SOA record (Start of Authority).
Any Fully Qualified Domain Name can be a host or a subdomain.
Subdomains are often used by internet service providers supplying web services. They allocate one (or more) subdomains to their clients who do not have their own domain name. This allows independent administration by the clients over their subdomain.
Subdomains are also used by organizations that wish to assign a unique name to a particular department, function, or service related to the organization. For example, a university might assign "cs" to the computer science department, such that a number of hosts could be used inside that subdomain, such as
There as some widely recognized subdomains including www, ftp. This allows for a structure where the domain contains administrative directories and files including the ftp directories and webpages. The ftp subdomain can contain logs and the web page directories. The www subdomain contains the directories for the webpages. Independent authentication for each domain provides access control over the various levels of the domain.
- .ac.uk - academic (tertiary education, further education colleges and research establishments) and learned societies
- .co.uk - general use (usually commercial)
- .gov.uk - government (central and local)
- .judiciary.uk - courts (to be introduced in the near future)
- .ltd.uk - limited companies
- .me.uk - general use (usually personal)
- .mod.uk - Ministry of Defence and HM Forces public sites
- .net.uk - ISPs and network companies (unlike .net, use is restricted to these users)
- .nhs.uk - National Health Service institutions
- .nic.uk - network use only (Nominet UK)
- .org.uk - general use (usually for non-profit organisations)
- .parliament.uk - parliamentary use (only for the UK Parliament and the Scottish Parliament)
- .plc.uk - public limited companies
- .police.uk - police forces
- .sch.uk - Local Education Authorities, schools, primary and secondary education, community education
A vanity domain is a subdomain of an ISP's domain that is aliased to an individual user account, or a subdomain that expresses the individuality of the person on whose behalf it is registered.
Depending on application, a record inside a domain, or subdomain might refer to a hostname, or a service provided by a number of machines in a cluster. Some websites use different subdomains to point to different server clusters. For example,
www.example.com points to Server Cluster 1 or Datacentre 1, and
www2.example.com points to Server Cluster 2 or Datacentre 2 etc..
Subdomains versus directoriesEdit
Subdomains are different from directories. For example, example.com/ComputingStuff points to a directory within the example.com domain. Internet service providers frequently assign the root of a subdomain server to a directory within the master domain server root with a similar (but not necessarily identical) name.
- P. Mockapetris (November 1987). "Name space specifications and terminology". Domain names - concepts and facilities. IETF. sec. 3.1. doi:10.17487/RFC1034. RFC 1034. Retrieved 2008-08-03.
- RFC 1035, Domain names--Implementation and specification, P. Mockapetris (Nov 1987)
- "BBC News - UK court systems set to adopt judiciary.uk domain names". BBC News. 23 November 2011. Retrieved 26 February 2014.