Deploying JSON-LD on a legacy CMS often means waiting on a developer release cycle for something that's really just a content change. Injecting structured data at the CDN edge with Cloudflare Workers (or an equivalent NGINX layer) lets you parse backend data and add JSON-LD directly into the HTML head before the response reaches the crawler — without touching CMS code at all.
A minimal injection worker
addEventListener('fetch', event => {
event.respondWith(handleRequest(event.request))
})
async function handleRequest(request) {
const response = await fetch(request)
const contentType = response.headers.get('content-type')
if (!contentType || !contentType.includes('text/html')) {
return response
}
const schemaData = {
"@context": "https://schema.org",
"@type": "Article",
"headline": "Edge Schema Injection Guide",
"author": { "@type": "Person", "name": "Paul Lovell", "url": "https://www.paullovell.uk" }
}
const jsonLdScript = `<script type="application/ld+json">${JSON.stringify(schemaData)}</script>`
return new HTMLRewriter()
.on('head', {
element(element) {
element.append(jsonLdScript, { html: true })
}
})
.transform(response)
}Why this is worth doing
Schema updates deploy globally within seconds via CDN rules rather than a release pipeline, and because the injection happens on the raw HTML response, the JSON-LD is present during the crawler's first pass — no JavaScript execution required to see it. The tradeoff is that this markup now lives outside your CMS, so it needs its own change log and testing discipline rather than inheriting the CMS's.
Related articles
Schema Markup for SEO: The Complete Practitioner's Guide
Rich snippets get the attention, but entity disambiguation is the bigger reason schema markup matters — especially as AI Overviews take a growing share of search.
JSON-LD vs Microdata vs RDFa: Which Should You Actually Use?
All three formats validate identically. The real difference is which one survives your next template redesign without silently breaking.
Does Schema Markup Help with Google AI Overviews?
Schema markup doesn't earn a citation on its own — it removes friction in the retrieval process that decides which pages are confident enough to cite.
Organization Schema: The Full Property Guide
Organization schema is the entity everything else on your site references. Get it right once, and every other type inherits a stable identity to point back to.

Written by
Paul Lovell
International SEO Consultant & Founder of Always Evolving SEO. 15+ years running technical audits, log-file analysis, and root-cause fixes for multimillion-dollar businesses — speaker at SMX London, Search & Content Summit, and SEMrush events.