This is the drop-in plugin — a single self-contained file with no dependencies. It is the
WordPress counterpart of the Next.js middleware and
Cloudflare Worker. It ships in shadow mode (log-only),
so installing it can never change what your visitors see until you switch to Live.The plugin is listed as Bluemoon Agent Edge Network, but its file, folder and download are
named
bluesky-aen. Keep those names: an already-installed site then updates in place instead
of ending up with two copies of the plugin.What the plugin does
On every front-end request, before your theme renders, it:- Passes through anything that isn’t a known AI crawler — your site behaves exactly as before.
- Never touches search bots — Googlebot, Bingbot and Applebot always get your real page (the cloaking firewall).
- Serves verified answer-engine crawlers — in Live mode — the optimized version of your page instead of your HTML page. Crawlers that can’t be verified get your normal page (verification levels).
- Reports every hit to Agent Analytics, so you see who crawled what and whether it was served.
Before you start
- A WordPress site you can add a plugin to (WordPress 5.6+, PHP 7.4+).
- An edge token (format
aen_...) from Agent Analytics in the Bluemoon app: choose WordPress / PHP and click Connect edge, or open Setup if the site is already connected.
Install it
- Upload the plugin (recommended)
- Single file (no zip)
1
Download the plugin
Get bluesky-aen.zip —
or use the Download plugin button under Agent Analytics → Setup → WordPress / PHP in the app.
2
Upload and activate
In WordPress admin, go to Plugins → Add New → Upload Plugin, choose the
.zip,
click Install Now, then Activate.3
Paste your edge token
Go to Settings → Bluemoon AEN, paste the edge token from Agent Analytics → Setup, and save.
Test it
The plugin ships in shadow mode — it serves your normal page to everyone and only logs what it would have served, so there is zero risk while you validate.1
Trigger a real AI crawler
Open ChatGPT (or Perplexity) with browsing and ask a question that makes it look up your
site.
2
Watch the hit land
The visit appears in Agent Analytics under Recent activity, with the crawler’s name,
marked Verified.
3
Go live
Once you see verified hits, switch the serve mode to Live under Agent Analytics → Setup → How much to serve.
No redeploy — the plugin reads the mode from the dashboard. Verified answer-engine crawlers now
get the optimized version. See Serve modes.
Caching
If you run a full-page cache (WP Super Cache, W3TC, LiteSpeed, or a CDN), it may serve a cached HTML page to crawlers before the plugin runs. Exclude AI crawler user-agents from the cache (e.g.ChatGPT-User, PerplexityBot, ClaudeBot, Google-Extended) so the
plugin can run for them. Human traffic stays fully cached.
Troubleshooting
No hits appear in Agent Analytics
No hits appear in Agent Analytics
Confirm the plugin is active, the edge token is saved under Settings → Bluemoon AEN,
and you actually triggered a browsing AI. Opening your site in your own browser does not create a hit.
My site looks unchanged
My site looks unchanged
That’s expected in shadow mode, and for every human visitor in any mode — the plugin only
changes the response for verified AI crawlers.
The optimized version is never served (Live mode)
The optimized version is never served (Live mode)
The request must be Verified (
IP_VERIFIED), the crawler’s purpose must be enabled, and
Bluemoon must have an optimized version of that URL. Check the page’s status in Agent Analytics
under See all pages → Your pages. A serve mode change can take up to about five minutes to
reach the plugin.Will this slow my site down?
Will this slow my site down?
No. Human and search-bot traffic passes straight through, and hit reporting never delays the
response. If Bluemoon is ever unreachable, the request fails open to your normal page.
Full plugin source
The plugin is a single self-contained file — no Composer, no build step.bluesky-aen.php
bluesky-aen.php
bluesky-aen.php
How it differs from the other drop-ins
- It runs inside WordPress at
template_redirectpriority0, before your theme renders. - It reads the visitor IP from
CF-Connecting-IP, thenX-Forwarded-For, thenREMOTE_ADDR, so it works behind Cloudflare or a load balancer. - It reads the serve mode from your Bluemoon dashboard, so you go Live without a redeploy. A change takes up to about five minutes to apply.