I looked up couple of questions on SO, which seem to suggest that two continuous hyphens (e.g. my--website.com) are not allowed but when I search for same domain name on http://www.register.com/index.rcmx, it gladly accepts the name while rejects non valid domain names like my#website.com.
Validation for URL/Domain using Regex? (Rails)

- 1
- 1

- 6,778
- 17
- 61
- 97
4 Answers
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--

- 334,560
- 70
- 407
- 495
-
1This has rules which would allow double dashes: http://www.faqs.org/rfcs/rfc1035.html – Lee Meador May 09 '13 at 18:21
-
2RFC1035 is not the last word on legal domain names and host names - there's more in RFC 2181. – Alnitak May 09 '13 at 18:25
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).

- 202
- 2
- 8
-
-
-
And only for INTERNATIONALIZED DNS, e.g. http://xn--j1ail.xn--p1ai/ which is the ASCII version of http://кто.рф – abatishchev Oct 05 '20 at 22:01
Some TLDs allow as many consecutive dashes as you want, others seem to have specific rules about their positioning.
This is a working website: l-------------------------------------------------------------l.tk (mirror)
The universal rules are:
- Not in the 3rd and 4th position, except as part of an IDN
- Not at the beginning or end
Nothing else can be counted on unless you thoroughly test each individual TLD.

- 21
- 3
It must be "allowed", regardless of the answers here, because https://hp--community.force.com exists. However, perhaps that's only okay because it's a subdomain of a registered domain, and not a registered domain in itself.

- 9
-
1I'm quite sure the rules for subdomains are different - and less restrictive - than the ones for domain names. – Jan Aagaard Jan 09 '20 at 08:26