How many subdomains can you have on your domain? And with that, I mean levels of subdomains.
For example, you have the domain example.com
, I know you can have test.example.com
, but how many levels can you have? Like test2.test.example.com
, test3.test2.test.example.com
etc.
Second, I was wondering 2 things about email addresses. First of all, how common is the usage of subdomains in an email address (IF it's even possible)? I've never seen something like test@test.example.com
to be honest so I'm not exactly sure. And if it's possible, how many levels (just like above) can you have?
And last, can the questions above depend on the domain registrar or the mail server etc.? And what could it depend on?
Answer
There are no direct limits on how many levels i.e. dots you can have in a hostname. However, a RFC1034 compliant hostname can only be 255 bytes long, leaving 253 bytes for a fully qualified domain name FQDN in DNS. Some systems and TLS/SSL limits FQDN to 64 bytes and FQDN in emails should not exceed(*) 245 or 221 bytes depending on the maximum user name length (8 or 32).
As TLD usually takes at least 2 characters and .
and every part of the hostname must be at least one character long, the space left for additional dots i.e. theoretically maximal levels would be:
- (253-3)/2 = 125 levels after TLD for theoretically longest (not so useful) hostname
- (221-3)/2 = 109 levels after TLD, if you wish to use it for email
- (63-3)/2 = 30 levels after TLD, if you wish to use SSL/TLS.
And yes, user@subdomainof.subdomain.example.com
is in a valid email address format.
(*) The special limitation for email address length is a result of RFC 2821 4.5.3.1 and 4.1.2:
4.5.3.1 Size limits and minimums
path
The maximum total length of a reverse-path or forward-path is 256
characters (including the punctuation and element separators).
4.1.2 Command Argument Syntax
Path = "<" [ A-d-l ":" ] Mailbox ">"
As forward-path must include the angle brackets, only 254 characters are left for the email address. Then, the username@
part of 8(+1) or 32(+1) must be excluded to get the maximum FQDN lenght.
No comments:
Post a Comment