Can a Domain Name Contain an Underscore?

No — not in the part of an ordinary web domain that you register, such as my_domain.com. Standard hostname labels use letters, numbers and hyphens, not underscores. The confusing part is that underscores are perfectly normal elsewhere in DNS, which is why names such as _dmarc.example.com exist.

By Hasnaat Mahmood Published Updated
Ech, the Find Cheap Domains mascot

Short answer

You cannot normally register an underscore as part of a domain hostname.

For standard ASCII domain labels, the practical rule is letters, digits and hyphens. Underscores show up in DNS for special-purpose record names, but that is different from registering my_domain.com.

  • my_domain.com — no
  • my-domain.com — yes
  • _dmarc.example.com — valid DNS use

This question is more confusing than it first looks because both answers — “no” and “yes” — can appear online depending on what somebody means by a domain name.

If you mean the actual name you type into a registrar and buy, an underscore is not a normal permitted character. If you mean a DNS owner name used for a service or verification record, underscores are common and intentional.

The registration rule

An underscore is not part of the normal hostname character set

ICANN describes ordinary ASCII domain labels as LDH labels: letters, digits and hyphens. The underscore is not included.

_
The problem is the character, not where you put it.

cheap_domains.com, cheapdomains_.com and _cheapdomains.com are all outside the normal hostname form.

If the same name works with a hyphen instead, the hyphen is the conventional separator: cheap-domains.com.

Normal hostname form find-cheap-domains.com

Letters and hyphens are fine, provided the label follows the relevant registry rules.

Not a normal registrable hostname find_cheap_domains.com

The underscore is what makes this unsuitable as an ordinary registered web hostname.

RFC 1035 set out the traditional preferred hostname syntax using letters, digits and hyphens, and ICANN still describes standard ASCII domain labels in those terms. Internationalised domain names can represent additional scripts, but that does not turn an underscore into a normal hostname character.

Where the confusion comes from

Underscores are deliberately used in DNS — just not as normal hostnames

The DNS itself is broader than the hostname rules. Special-purpose DNS records often use an underscored label so software can recognise that the name is describing a service or attribute rather than a normal host.

Names you may already have seen

These are completely normal DNS labels even though the underscore would be unsuitable in the registered hostname itself.

_dmarc.example.com Used for DMARC email policy.
_domainkey.example.com Commonly appears in DKIM-related DNS names.
_acme-challenge.example.com Used by ACME DNS validation for certificates.

RFC 8552 explains this convention directly: because underscores are not legal host-name characters, an underscored DNS label can be used as a clear marker for service-related data. That separation is useful rather than accidental.

So seeing an underscore in your DNS control panel does not mean your registrar should allow you to buy a domain containing one.

Why registrars reject it

A domain search box is checking registration rules, not every possible DNS label

That is why typing an underscore into a registrar can produce an invalid-name message even though you have seen underscores elsewhere in DNS.

Domain registration and DNS are related, but they are not the same rule set.

A registry has to decide which second-level labels it will register. DNS can then contain additional record names underneath that registered domain.

  • The registered label has to meet the registry’s allowed-character rules.
  • Standard ASCII hostname labels use letters, digits and hyphens rather than underscores.
  • DNS beneath the registered domain can use underscored service labels where the relevant protocol calls for them.
  • Browsers, email systems and other software have long relied on the hostname convention, so trying to treat `_` as a normal separator creates compatibility problems.
My view

With a portfolio of more than 300 domains, I would not try to work around this even if a niche system appeared willing to accept an underscore somewhere. A domain should be easy to type, say aloud and use across browsers, email and third-party services. If two words need separating, I would either join them or use a hyphen.

Better alternatives

What should you use instead of an underscore?

If the version you wanted contained `_`, there are usually cleaner alternatives that keep the name readable without creating a compatibility problem.

Join the words

cheapdomains.com is usually cleaner than adding punctuation if the joined phrase remains easy to read.

Use a hyphen

cheap-domains.com is the closest visual alternative to an underscore and uses a standard hostname character.

Adjust the wording

If the exact version is unavailable, changing one word can be better than forcing awkward punctuation into the name.

Try another extension

A good name may still be available under a suitable extension. Our domain registration comparison can help when you are checking current registrar pricing.

If the reason you wanted an underscore was because the clean version is already registered, our guide on what to do when your preferred domain name is taken is the more useful next step.

Ech, the Find Cheap Domains mascot

The simple version

Use the underscore in DNS records when a protocol asks for it — not in the domain you register

For an ordinary website domain, stick to the accepted hostname characters. If you need a separator, a hyphen is the standard option; if you see `_dmarc` or another underscored DNS name later, that is a different and perfectly normal use.

Hasnaat Mahmood

Written by

Hasnaat Mahmood

Hasnaat is the founder of Find Cheap Domains and personally manages a portfolio of more than 300 domains. His experience covers domain selection, registrations, renewals, transfers and DNS management.

Hands-on domain portfolio experience