Cloudflare hides a contact email in the page source
Diagnose Cloudflare email obfuscation on a contact page, compare raw HTML with the browser, and expose an intended public address using a narrow exception.
By Crawlito · 5 min read
In short
- Cloudflare can replace email addresses in delivered HTML and use a deferred script to restore them in the browser.
- A working address in a browser does not establish that the literal address exists in the raw response.
- Cloudflare documents an HTML comment exception for specific email addresses.
On this page
If a contact page shows an email in a browser but the public HTML contains only an encoded link, check Cloudflare Email Address Obfuscation. The feature changes the delivered HTML and supplies a script that decodes the address for browser users. Decide which contact details are meant to be public before changing the setting. Cloudflare’s Email Address Obfuscation documentation
Verify that obfuscation is the actual cause
Start with the public contact page, using a fresh session through the production hostname. Copy the contact link destination after the page has loaded. Then save the full HTML response from that same URL and search for the intended public address and for Cloudflare's email protection markers. A CMS can independently encode an address, insert it through a form widget, or hide it behind a user interaction. Establish which layer changed the information before editing the DNS or firewall settings.
curl -sSL -D contact-headers.txt -o contact-source.html https://example.com/contact/
rg -n 'data-cfemail|email-decode|cdn-cgi/l/email-protection|help@example.com' contact-source.htmlUse your organization's actual public mailbox in the search. A matched decode script shows that the feature can operate on the page; it does not identify which specific address was transformed. Inspect the surrounding link for the contact role you care about. A footer with several obfuscated employee addresses might account for the script even if the public support address is already readable.
Compare the fetched response with the browser's Elements panel after scripts have run. Try the page again with JavaScript disabled and inspect what remains usable. Cloudflare documents a deferred decode script. A testing tool that reads the initial HTML and a browser that executes the supplied script can legitimately observe different contact information. The raw and rendered HTML guide helps document exactly which representation you inspected.
Define the intended public contact route
Decide what someone with a product problem should do when landing on this page. A public support inbox, a support request form, a telephone number, and a private employee address have different purposes. If the organization intentionally accepts requests only through a form, a well-labeled accessible form can supply the public route without exposing a mailbox that is intended to stay private. Explain who receives the request and which topics the form handles.
For a public press or accessibility mailbox, the requirement may be that a person can copy the address, open a mail client, or read it with limited scripting. A clear visible label and a working mailto: link can satisfy that purpose. Decide separately whether other mailboxes on the page should remain protected against simple scraping. A single business need to expose one role address gives you a precise scope for the change.
Check listings distributed by the site itself. A press kit PDF or organization structured data might already expose a supposedly hidden address. Conversely, a contact card may advertise an address that nobody monitors anymore. Get the responsible team to confirm the actual public destination and update contradictory references. See the organization markup guide when the same role is described in a structured contact record.
Apply a narrow exception for an intended public address
Cloudflare documents wrapping an address in email_off HTML comments to exclude that content from obfuscation. Apply the exception in the template for the public mailbox and confirm that the emitted HTML still contains the markers before the edge transforms it. If your build strips comments, the server can send perfectly usable contact markup to the CDN while omitting the instruction that was meant to preserve it.
<!--email_off--><a href="mailto:press@example.com">press@example.com</a><!--/email_off-->This example intentionally exposes a fictional public press mailbox. For your implementation, confirm the scope in the delivered response, including both link target and visible text. Test a separate address that should retain ordinary obfuscation. Cloudflare also documents options for changing the zone setting or applying a configuration rule. A template-specific exception is easy to verify when the requirement concerns a single published address.
Check how the markup is authored. A rich text editor may escape comment syntax and show it to readers. A server-side Markdown renderer may discard comments, and an HTML minifier can remove them before the CDN receives the page. Put the exception in the layer that actually controls the final origin HTML for that contact card. Preview results at the public hostname because an origin preview might never exercise Cloudflare's transform.
Test the contact action as well as the source
After deployment, repeat the raw GET and compare it with the earlier file. Verify that the visible label names the right role, the actual link points to its monitored mailbox, and the page retains a clear contact route with scripts disabled. A readable address with the wrong domain is a more urgent user problem than its encoding. No test email is required to inspect whether a link targets the planned mailbox.
Repeat on mobile, any translated version, and a page that includes the same contact card through another layout. A site's footer may come from a shared theme while individual branch contact pages read from a directory component. Fixing one does not prove the other changed. Record one intentionally protected example as a control so you can see whether the change reached beyond the intended public address.
For an SEO or AI-readiness report, describe exactly what you verified. An anonymous GET now includes the literal public press email, the rendered link points to the same address, and the contact form remains available. That observation establishes readability of the contact route. Whether an assistant chooses to surface a particular contact method depends on its own behavior and the user's question. The guide to JavaScript and AI crawlers discusses how to frame such limitations.
Check a translated page that reuses the contact card
A common pattern stores the support mailbox in a central settings record while the translated contact pages keep their own rich text. The English page might render a shared component with the exception comments, while the translated page prints an independent hyperlink into the body. Fetch one page from each implementation and compare the actual source around the role address. A successful check on the default language establishes only that its particular rendering path works.
Also inspect the visible wording. If a translated page offers a different mailbox for local support, confirm that the local team expects it to be public. Applying the English mailbox everywhere could restore technical readability while routing real customers to the wrong language team. A small test table with URL, contact role, intended mailbox, and observed link target gives the editors a precise acceptance check for each locale. Include a page without that contact card to verify that the exception stays attached to its intended component.
Frequently asked questions
Does an encoded address mean Cloudflare blocked the whole page?
No. The HTML can be accessible while one contact detail is transformed. Check the status, page body, and specific link independently.
Can I keep obfuscation everywhere except the press mailbox?
Cloudflare documents a per-address HTML exception. Verify the transformed production page and an unaffected mailbox after deployment.
Will publishing the literal address also expose it to scrapers?
A publicly readable address can be collected by clients that fetch the page. Use a monitored role mailbox when the organization intentionally provides that public contact route.
Inspect the public contact page
Use the free page check on the contact URL and compare its readable content with the saved raw HTML. Test the browser link separately to complete the reader's journey.
Filed under CDN and bot protection. Topics: cloudflare, raw-html, javascript, troubleshooting