According to RFC 1738: Uniform Resource Locators (URL): 3.1. Common Internet Scheme Syntax, must the host component contain a dot, e.g., "example.com"? I.e., may it be composed of only one domain label?
No, the host doesn't have to contain a dot. I.e., yes, only one domain label is fine. Look at domain
, subdomain
and label
( https://www.rfc-editor.org/rfc/rfc1034#section-3.5 ):
<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> ::= any one of the 52 alphabetic characters A through Z in upper case and a through z in lower case
<digit> ::= any one of the ten digits 0 through 9
This document is referenced from https://www.rfc-editor.org/rfc/rfc1738#section-3.1 to describe the host naming rules.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With