Domain Name
Table of Contents
About
The term domain name is used to refer to the name of a node in the domain namespace that identifies an object.
Syntax
Hierarchical Name
A domain name is a succession of one or more label separated by dots (known alas as the dot-atom form) that indicates the hierarchical structure (tree) of the namespace.
In a simplified way, a domain name looks like that:
[label][.apexLabel][.tldLabel].rootLabel
where:
- label is a string that starts with a letter
- apexLabel is the label that defines the apex domain name (known as the registrable domain)
- tldLable is the label of the top-level domain name
- rootLabel is the root label of the root which is the null character.
You can find the exact syntax at the end of this article as EBNF grammar
Relative vs Absolute
Absolute
A complete/qualified domain name ends always with the root label of the namespace tree, and therefore the complete/qualified printed form ends with a dot.
An absolute domain name is more known as the fully qualified domain name (or FQDN)
For example, poneria.ISI.EDU.
Relative
A relative domain name represents the starting labels and should be completed by the local domain.
For example, “poneria” used in the ISI.EDU domain.
A relative name is also known as the short name
Case
domain names can be written with arbitrary case, but domain name comparisons for all present domain functions are done in a case-insensitive manner
A node can be created with the label A or a, but they can't be sibling
Length Limitations
The total number of octets that represent a domain name (i.e., the sum of all label octets and label lengths) is limited to 255.
Storage
DNS record
A DNS name is an IP name stored in a DNS database. You will find the relative form in the first column of a DNS table.
In a DNS table, you would see:
NAME TYPE VALUE
--------------------------------------------------
bar CNAME foo.example.com.
foo A 192.0.2.23
where
- name is a relative name (ie IP NAME)
Host file
The domain portion of an email address identifies the point (node) to which the mail should be delivered:
- either a host name
- or a mail exchanger name
Grammar
The exact definition of a domain name is given in the Rfc1024 - Preferred Name Syntax)
domain ::= subdomain | " "
subdomain ::= label | subdomain "." label
label ::= letter ( ( ldh-str ) let-dig )
ldh-str ::= let-dig-hyp | let-dig-hyp ldh-str
let-dig-hyp ::= let-dig | "-"
let-dig ::= letter | digit
letter ::= [A-Za-z]*
digit ::= [0-9]*