Velohost Velohost

Astro Integration

Astro NoEmail

Protect email addresses from basic scrapers by obfuscating them at build time — no JavaScript, no runtime logic.

Last Updated: 01 April 2026

Usage Snapshot

117

Downloads in Last 30 Days

v1.0.0

Latest npm Version

Source: npm registry

Why This Plugin Exists

Email addresses published in plain HTML are routinely harvested by simple bots, leading to spam and abuse.

Astro NoEmail solves this problem at build time by converting email addresses into numeric HTML entities in the final output.

The result is static, cache-safe HTML that renders normally in browsers but is harder for basic scrapers to harvest.

Design Principles

  • Build-time only — no runtime JavaScript or hydration
  • Static, cache-safe output
  • Minimal surface area and zero configuration by default
  • Fail-safe behaviour — never blocks a build
  • Works with any adapter or CDN

What This Plugin Delivers

  • Obfuscates plain-text email addresses in HTML output
  • Converts emails into numeric HTML entities
  • Skips <script>, <style>, and <noscript> blocks
  • Avoids double-encoding existing HTML entities
  • Processes only final build output files

Installation

npm install astro-noemail

No configuration is required. The plugin runs automatically during astro build and operates only on final HTML output.

FAQs

What does the Astro NoEmail plugin do?

Astro NoEmail scans generated HTML files at build time and replaces plain-text email addresses with numeric HTML entities.

Does Astro NoEmail affect mailto links?

Yes. Email addresses inside visible text and mailto: links are obfuscated, while continuing to function normally in browsers.

Implementation FAQs

Why does Astro NoEmail exist?

Plain-text email addresses are routinely harvested by basic bots. Astro NoEmail reduces this risk by obfuscating emails at build time.

Does Astro NoEmail run at runtime?

No. Astro NoEmail runs exclusively at build time and produces static HTML output.

Does Astro NoEmail require configuration?

No configuration is required. The plugin works out of the box. It can be disabled explicitly if needed.

Is the obfuscation safe?

Yes. The plugin skips script, style, and noscript blocks, avoids double-encoding, and never crashes or blocks a build.

Do mailto links still work?

Yes. Obfuscated mailto links continue to function normally in browsers.

Is Astro NoEmail compatible with CDNs?

Yes. Because all changes are static, the output can be cached aggressively and works behind any CDN.

Project Links

Source code, package distribution, releases, and documentation.

Need Implementation Details?

Read the FAQs for usage patterns, integration caveats, and rollout guidance.