Domain Name Validator
Check that a domain name or hostname follows the rules for labels, length and characters. Paste a domain or a whole URL and one or many lines.
How to check a domain name
Paste your domain names
Paste or type it into the box, or press Try an example. One per line.
Read the result
A green or red message says whether it is valid, with the details below.
Fix and re-check
Edit the text and the result updates straight away.
This checks the format. It does not look the domain up.
Worked example
This is what Domain Name Validator gives for its own sample values. Open the tool above and change anything to try your own.
Domain names (one per line)
example.com https://sub.example.co.uk/path -bad.com localhost
| Value | Result | Details |
|---|---|---|
| example.com | valid | |
| https://sub.example.co.uk/path | valid | |
| -bad.com | invalid | "-bad" starts or ends with a hyphen. |
| localhost | invalid | The domain needs a dot and an ending such as .com. |
About Domain Name Validator
Check that a domain name or hostname follows the rules: labels of up to 63 characters, letters, digits and hyphens, no hyphen at the start or end, and an ending that is not all digits. A pasted URL is reduced to its domain first.
FAQs
Does it check the domain is registered?
No. It checks the syntax only.
What about international domains?
Unicode labels are accepted. Convert them to the xn-- form with Punycode Converter.
Does localhost pass?
No, because it has no dot and ending. Public domains need at least two labels.