Neste artigo
What Is a Domain Name?
A domain name is a human-readable address that maps to a numeric IP address on the internet. Instead of remembering 93.184.216.34, users can type example.com into their browser. The Domain Name System (DNS) translates these names into IP addresses behind the scenes.
Domain names are hierarchical, reading from right to left: the top-level domain (TLD) like .com comes first in the hierarchy, followed by the second-level domain (the name you register), and optionally subdomains like www or mail.
Domain Name Structure
A valid domain name follows strict formatting rules defined in RFC 1035 and RFC 5891 for internationalized names.
- Labels — a domain is split into labels separated by dots. Each label can be 1-63 characters long
- Characters — labels may contain letters (a-z), digits (0-9), and hyphens. Hyphens cannot appear at the start or end of a label
- Total length — the full domain name (including dots) must not exceed 253 characters
- Internationalized Domain Names (IDN) — non-ASCII characters are supported via Punycode encoding (xn-- prefix)
Experimente gratuitamente — sem cadastro
Validar um nome de dominio →How Domain Validation Works
Domain name validation checks whether a string conforms to the DNS naming rules and represents a syntactically valid domain.
- Format check — the string must contain at least one dot, with valid labels on each side
- Label validation — each label is checked for length (1-63 chars), valid characters, and proper hyphen placement
- TLD check — the rightmost label must be a valid TLD (at least 2 characters, alphabetic or valid IDN)
Common Use Cases
Domain name validation is essential in web development, security, and data processing.
- Form validation — ensuring users enter valid domain names in email addresses and URL fields
- Email parsing — extracting and validating the domain part of email addresses
- Security filtering — checking domains against blocklists and verifying legitimate sources
- DNS configuration — validating domain entries before adding them to DNS records
TLD Types and Registration
Top-level domains are categorized into several types managed by ICANN.
- Generic TLDs (gTLD) — .com, .org, .net, .info, and hundreds of newer gTLDs like .dev, .app, .io
- Country-code TLDs (ccTLD) — two-letter codes representing countries: .uk, .de, .fr, .jp, .br
- Sponsored TLDs — restricted domains managed by specific organizations: .edu, .gov, .mil
Frequently Asked Questions
Can a domain name contain underscores?
Standard DNS domain names cannot contain underscores — only letters, digits, and hyphens are allowed in labels. However, some DNS record types like SRV and DKIM TXT records do use underscored labels as a convention.
What is the maximum length of a domain name?
The total length of a domain name cannot exceed 253 characters, and each label (the parts between dots) is limited to 63 characters. Most registrars impose even shorter limits for practical reasons.
Are domain names case-sensitive?
No. DNS is case-insensitive — Example.COM, example.com, and EXAMPLE.com all resolve to the same address. However, convention is to use all lowercase.