Skip to content

MNS Specification

Every section of the domain must comply with the following regular expression.

/^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/

All domains are enforced to be lowercase. Uppercase input is automatically converted by the frontend to lowercase:

  • Input: Domain.night → Processed as: domain.night
  • Input: MY-SUB.domain.night → Processed as: my-sub.domain.night

If the user inputs an uppercase domain into the SDK, it will return an error as a response due to the domain not adhering to the expected regex.

The current implementation enforces the following restrictions on subdomains:

  • No practical limits on subdomain depth, the set of all possible subdomains a domain can have.
  • No practical limits on domain width, the set of all possible generated domains.
  • No practical limits on the length each domain or subdomain can have.
  • Example: a.b.c.d.e.f.g.h.i.j.night is a valid domain according to the rules.
  • Example: a.night, b.night, c.night, …, z.night, aa.night, … are all valid domains in the width of the domain set.

The following domains are all reserved and cannot be registered:

  • foo.night
  • bar.night
  • turing.night
  • ada.night
  • domain.night
  • my-domain.night
  • mydomain123.night
  • 123domain.night
  • a.night
  • abc.night
  • sub123.domain.night
  • 123sub.domain.night
  • s.domain.night
  • sub1.domain.night
  • s1d2.night
  • s-d.night
  • s-u-b.domain.night
  • -domain.night (cannot start with a hyphen)
  • domain-.night (cannot end with a hyphen)
  • my_domain.night (cannot contain underscores or special characters)
  • my..domain.night (cannot contain consecutive dots)
  • .night (cannot be empty)
  • domain (must end with .night)
  • do main.night (cannot contain spaces)
  • do\tmain.night (cannot contain tabs or other whitespace characters)
  • sub-.domain.night (cannot end with a hyphen)
  • my..sub.domain.night (cannot contain consecutive dots)

All domain parts are valid in the contracts but the frontend (and more importantly the SDK for wallet integration) will restrict the user to only create and resolve domains that follow the above specification.