Toolvito

Works on this device

Domain Name Length Checker

Type one or more domain names to see how long each label and the whole name are, counted the way DNS stores them. The tool also checks the characters and the hyphens of a host name.

Enter your values

Your values

One name on each line. Letters such as ü are counted in their xn-- form, as DNS stores them. A web address or an email address works too: only its domain part is checked.

Your values are worked out in this browser. They are not sent to a server.

Your check will show here

Type a domain name to check it.

How to use the checker

  1. Type or paste one domain name on each line, such as shop.example.com. A web address or an email address works too.
  2. Choose the rules for the characters: a host name (web sites and mail servers) or any DNS name, which may have underscores, as in _dmarc.example.com.
  3. Read the result. For one name you see its lengths and the room that is left. For several names you see a summary.
  4. The Labels table shows each label with its length in characters and the room left of 63. The Names table shows each whole name.

The limits

  • A label, the part between two dots, has 1 to 63 characters (octets).
  • A whole name has at most 255 octets on the wire. DNS sends a length octet before each label and a zero octet at the end, so the longest name has 253 characters in text form, counting the dots between labels but not a final dot.
  • International names are counted in their ASCII form. A label with letters such as ü or 日 is stored as xn-- and its Punycode, which is longer than the label you see.
  • Host names use only the letters a to z, the digits 0 to 9 and the hyphen. A label does not start or end with a hyphen. Capital and small letters count the same.
  • The top-level domain (the last label) is not all digits, so a name such as example.123 is not valid. Four numbers such as 192.0.2.1 are an IP address, not a name.

Worked example

The name shop.münchen.de has three labels. In ASCII form it is shop.xn--mnchen-3ya.de: the label münchen has 7 letters but 14 characters as xn--mnchen-3ya. The whole name has 4 + 1 + 14 + 1 + 2 = 22 characters. On the wire it is 1 + 4 + 1 + 14 + 1 + 2 + 1 = 24 octets. It is within the limits, with 231 characters of room left before 253.

Where the rules come from

  • RFC 1035 (1987), section 2.3.4: labels of 63 octets or less, names of 255 octets or less.
  • RFC 952 and RFC 1123: letters, digits and hyphens in host names, and a label may start with a digit.
  • RFC 3696, section 2: a top-level domain is not all digits.
  • RFC 3492 and RFC 5891: Punycode and the xn-- form of international labels. Two hyphens in the third and fourth places are kept for such coded labels.

Limits you should know

  • The tool checks the general rules of DNS and host names. Registries add their own rules for the part you register, such as a fewest number of characters or a list of allowed letters. Ask the registry of the top-level domain.
  • It does not check whether a name is registered or free. Use the WHOIS & Domain Lookup for that, and the DNS Lookup to see its records.
  • International names are first normalized (NFKC) and written in small letters. For checks of the letters themselves, such as mixed scripts and look-alike letters, use the Punycode Converter.
  • Up to 500 names at a time.

Related tools