Skip to main content
The Dedica middleware is a small piece of code that runs in front of your site. It fetches your site’s policy from Dedica, recognises AI agents, and serves them content from Dedica. Every other request goes to your site unchanged. Dedica doesn’t care what the middleware is. Anything that follows the middleware protocol works: a Cloudflare Worker, a Spring Boot filter, an Express middleware, a reverse proxy.

It fails open

Every call the middleware makes to Dedica has a timeout. On any error, timeout or unexpected answer, the request goes to your site exactly as if the middleware weren’t there. If Dedica is down, the middleware keeps using the last policy it fetched for up to 15 minutes, then passes everything through.

Who gets what

  • People and browsers always get your normal page.
  • Search engines, link previews and monitors (Googlebot, for example) always get your normal page.
  • AI agents (GPTBot and ClaudeBot, for example) get the agent version of a page when one is approved and the site is in autopilot.
  • Anyone who asks for a .md URL (/pricing.md), sends Accept: text/markdown or adds ?mode=agent gets the agent version.
Agent versions of normal page URLs are sent with Cache-Control: private, no-store, so a person who visits the same URL next still gets your page.

Connection status

The middleware sends Dedica a heartbeat at least every 5 minutes and serves /.well-known/dedica.json on your domain. Dedica treats it as connected while both are true and the last heartbeat is less than 15 minutes old. If the check fails, see Troubleshooting.