Can domain name have two continuous hyphens

It's legal in a domain name, and required for internationalised domain names (IDNs) which when converted from Unicode to ASCII end up prefixed with xn--


In general double hyphens are allowed. However, in your specific example, it should not be possible, because they may not occur on the third and fourth position except when writing IDN labels in their xn-- notation. See the following section from RFC 5891:

4.2.3.1. Hyphen Restrictions

The Unicode string MUST NOT contain "--" (two consecutive hyphens) in the third and fourth character positions and MUST NOT start or end with a "-" (hyphen).

Tags:

Dns

Regex