A .mil email address is reserved for the U.S. Department of Defense and its affiliated personnel, so the only legitimate way to obtain one is through official military assignment rather than public registration or commercial signup. The namespace is operated by the Defense Information Systems Agency and the underlying address must be issued by the unit or agency that owns the mailbox, which means there is no private signup path for civilians. The tool that solves the practical, public-facing half of this question is the Email Address Obfuscator, which converts every character of an address into a decimal numeric HTML entity so the source contains no literal address characters while ordinary browsers still render the link correctly when a visitor clicks it. Plain .mil addresses pasted directly into page HTML are harvested by simple address-matching scrapers within hours, then flooded with unsolicited mail, so the encoding serves as a single, deliberate trade-off: it raises the bar for basic plaintext scrapers without making any security claim about competent crawlers. For genuine abuse resistance, the obfuscation must be paired with a server-side contact form, content filtering, and the spam controls your host can apply.

What a .mil Email Address Actually Is
The .mil top-level domain is one of the original generic domains and is operated exclusively by the U.S. Department of Defense. Mailboxes under .mil are provisioned through official military channels for active duty members, civilian DoD employees, contractors on covered systems, and certain affiliated programs. A registrar comparison or a freemail signup flow will never produce a [email protected] or similar address. The Defense Information Systems Agency controls the namespace and the associated MX records; addresses are issued by the unit or agency that owns the mailbox, not by the requester. Anyone who claims to sell or broker a .mil address is describing an illegitimate process, and the result is typically either impersonation, a fake alias, or a mailbox outside the .mil zone that simply looks military to the buyer. That is why the practical question for most readers is not how to acquire a .mil address but how to publish one their organization already controls without turning the public page into a scraper feed.
Why Displaying a .mil Address on a Public Site Is Tricky
Once a unit, recruiter, public affairs office, or authorized contractor has a real .mil address, the next decision is how to publish it on an HTML page. Plain-text publication is the most common cause of harvesting: a scraper only needs a regex like [a-z0-9._%+-]+@[a-z0-9.-]+\.mil to pull every .mil address it sees. JavaScript-based decoders can hide an address from naive browsers but break when scripts are disabled, conflict with content security policy, and add moving parts that a careful reader can still inspect through the developer console. Image rendering of the address works at the cost of accessibility and copy-paste. Numeric HTML entity encoding sits between those extremes: every code point of the visible text and the mailto target is replaced with a decimal reference such as a for lowercase a, so the source contains no literal address characters while a browser decodes the entities when it renders the page. The reference for what these numeric character references mean is defined in the WHATWG HTML character references specification.
Encode the Address With the Email Address Obfuscator
- Type the full public contact address into the Email Address Obfuscator field and submit the form. The validator checks that the address has exactly one @, a nonempty local part, a domain with multiple labels, and no whitespace or control characters. Leading, trailing, or consecutive dots in the local part are rejected. The domain is lowercased and passed through the browser URL host parser, so internationalized domains are serialized to their ASCII-compatible form and the output can be reproduced across browsers.
- Copy the complete anchor element that the tool returns. The output is a single anchor with both the visible text and the mailto href encoded entirely as decimal numeric character references. The source contains no literal address characters at all, not in the visible text, not in the href, and not in the prefix. The local part keeps its original case and supported punctuation through the encoding, so the rendered text matches what you typed.
- Paste the anchor into raw HTML source: a template file, a code block in a static generator, or a custom HTML field that preserves entities. Do not paste it into a rich-text editor or a WYSIWYG view that decodes entities back to characters as soon as the page is saved. If the editor changes the ampersands to literal ampersands, the obfuscation is gone; if it changes them to a double-encoded escape, visitors see entity text instead of the address.
- Save and publish the page, then open the live URL in a new browser window and inspect its source. Confirm that the entities survived publication and that the visible text still reads as the intended address. Click the link once to confirm the mail client receives the correct address, and use the HTML Page Weight Analyzer if you want a sanity check on the rendered output and the page's overall footprint.
Verify the Live Page and the Rendered Mailto
Inspection is the part that most readers skip and most failures come from. A content management system can silently rewrite entities while it serializes the page, which is why the published HTML, not the copied snippet, is what matters. Open the live page, choose View Source, and confirm the anchor still contains only numeric references. If you see literal letters where the entities used to be, your CMS decoded the address for you and the obfuscation is gone. Next, click the link in a fresh browser profile to verify the mail client receives the exact address you typed: no whitespace, no missing plus-tag, no lowercased local part. If nothing happens, the href may have lost its mailto: prefix during a sanitizer pass. Visit the page with JavaScript disabled if you want to confirm entity decoding is part of HTML and not JavaScript, and try the Serp Snippet Preview to spot-check how the contact page appears in search results so you do not accidentally leak the address in the title or description. For a guided walkthrough of how mailto anchors are built, the step-by-step guide on creating an email address link covers the same anchor structure with more detail.
Real Limits of the Entity Approach
The obfuscation is deliberately narrow. Numeric entities are part of the HTML specification, so any crawler that understands HTML will decode them automatically. A modern scraper that parses the DOM, a headless browser, or a customer who copies the rendered text will recover the address immediately. Mailto links also expose addresses when a visitor clicks, when the browser shows the link target on hover, or when a tool enumerates mailto targets in the rendered DOM. The approach will not protect a secret address, a credential, or a private alias, and it makes no promise about reducing spam to a public contact. The Email Address Obfuscator is built for one specific case: a public address that must remain visible and clickable on a website, where the publisher wants to remove the address from the literal source text so that the simplest harvesters miss it. That is a useful property, but it is not access control and it is not privacy protection. The page itself states the limitation next to the result so an email obfuscator does not create false confidence about what it can and cannot defend.
Comparing Approaches for a Public Contact Address
| Approach | Visible to plaintext scrapers | Renders without JavaScript | Survives CMS serialization | Practical abuse resistance |
|---|---|---|---|---|
| Plain address in HTML | Yes | Yes | Yes | None |
| JavaScript decoder | Sometimes | No | Varies | Low |
| Numeric entities (this tool) | No | Yes | Only if the CMS preserves entities | Low |
| Server-side contact form | Not applicable | Yes | Yes | Higher with validation and rate limiting |
When a Contact Form Is the Better Choice
For genuinely high-value mailboxes, the practical defense is a server-side contact form with input validation, rate limiting, and the spam controls your host can apply. A contact form removes the address from the public page entirely, can require a CAPTCHA or proof-of-work, can throttle submissions per IP, and can route messages through a queue that filters obvious junk before delivery. Pair that form with the Meta Tag Generator to keep the contact page metadata consistent, and review the structured data with the Structured Data Checker so the page remains accessible to screening crawlers and well-formed for search engines. The entity technique is still useful for the second-tier public addresses a unit publishes on directory pages, recruiting pages, or public affairs listings, where the goal is to keep plaintext harvesters from finding the address in source while the link remains clickable for ordinary visitors. Both approaches can coexist on the same site: the contact form for primary intake, and the obfuscated mailto where the address itself is meant to be visible. If you are setting up a separate intake address for public posting, the guide on creating a special email address for public sites walks through the address-side choices that pair well with this technique.