The term domain name has multiple related meanings:
- A name that identifies a computer or computers on the internet. These names appear as a component of a Web site’s URL, e.g. ozdomainer.com. This type of domain name is also called a hostname.
- The product that domain name registrars provide to their customers. These names are often called registered domain names.
- Names used for other purposes in the Domain Name System (DNS), for example the special name which follows the @ sign in an email address, or the Top-level domains like .com, or the names used by the Session Initiation Protocol (VoIP), or DomainKeys.
They are sometimes colloquially (and incorrectly) referred to by marketers as “web addresses”.
The most common types of domain names are hostnames that provide more memorable names to stand in for numeric IP addresses. They allow for any service to move to a different location in the topology of the Internet (or an intranet), which would then have a different IP address.
By allowing the use of unique alphabetical addresses instead of numeric ones, domain names allow Internet users to more easily find and communicate with web sites and other server-based services. The flexibility of the domain name system allows multiple IP addresses to be assigned to a single domain name, or multiple domain names to be assigned to a single IP address.
This means that one server may have multiple roles (such as hosting multiple independent Web sites), or that one role can be spread among many servers. One IP address can also be assigned to several servers, as used in anycast and hijacked IP space.
Hostnames are restricted to the ASCII letters “a” through “z” (case-insensitive), the digits “0″ through “9″, and the hyphen, with some other restrictions. Registrars restrict the domains to valid hostnames, since, otherwise, they would be useless. The Internationalized domain name (IDN) system has been developed to bypass the restrictions on character allowances in hostnames, making it easier for users of non-english alphabets to use the Internet.
The underscore character is frequently used to ensure that a domain name is not recognized as a hostname, for example with the use of SRV records, although some older systems, such as NetBIOS did allow it. Due to confusion and other reasons, domain names with underscores in them are sometimes used where hostnames are required.
The following example illustrates the difference between a URL (Uniform Resource Locator) and a domain name:
- URL: http://www.example.net/index.html
- Domain name: www.example.net
- Registered domain name: example.net
As a general rule, the IP address and the server name are interchangeable. For most Internet services, the server will not have any way to know which was used. However, the explosion of interest in the Web means that there are far more Web sites than servers. To accommodate this, the hypertext transfer protocol (HTTP) specifies that the client tells the server which name is being used. This way, one server with one IP address can provide different sites for different domain names. This feature goes under the name virtual hosting and is commonly used by Web hosts.
For example, as referenced in RFC 2606 (Reserved Top Level DNS Names), the server at IP address 18.104.22.168 handles all of the following sites:
When a request is made, the data corresponding to the hostname requested is served to the user.