---
type: Integration Guide
title: "Akamai EdgeWorkers prerendering integration"
description: "Run bot detection and prerender routing in Akamai EdgeWorkers — the right choice for enterprise sites already on Akamai with strict performance SLAs."
resource: "https://prerendering.com/integrations/akamai"
tags: [integration, akamai edgeworkers]
timestamp: 2026-05-11T00:00:00Z
---

# Akamai EdgeWorkers prerendering integration

Run bot detection and prerender routing in Akamai EdgeWorkers — the right choice for enterprise sites already on Akamai with strict performance SLAs.

Akamai EdgeWorkers run JavaScript at the Akamai edge, integrated with Property Manager rules and Bot Manager. For enterprise sites already on Akamai, this is the natural place to add prerendering — no new vendor, no new operational surface. The integration is a thin proxy: the EdgeWorker detects crawlers and forwards their requests to the prerendering API, which returns ready-to-index HTML.

## Best for

- Enterprise sites already on Akamai for CDN, security, or DNS
- Teams with strict edge-performance SLAs
- Sites using Akamai Bot Manager for sophisticated bot classification

## Setup

Deploy an EdgeWorker that detects crawlers by user-agent (combined with Akamai Bot Manager signals where available) and proxies bot requests to the prerendering API: a GET to the rendering endpoint with the page URL in the `url` query parameter, the original bot user-agent in the `bot` query parameter, and your Basic auth token in the `Authorization` header. Note: we have not yet validated this pattern with a production Akamai deployment — treat the example as an API-accurate starting point and test before rollout.

```js
// EdgeWorker sketch — API-accurate, not yet field-tested on Akamai.
// Rendering endpoints: https://github.com/ostr-io/ostrio-docs/blob/master/docs/prerendering/rendering-endpoints.md
// Crawler UA RegExp:   https://github.com/ostr-io/ostrio-docs/blob/master/docs/prerendering/shared/crawler-ua-regex.md
import { httpRequest } from 'http-request'

export async function responseProvider(request) {
  const ua = request.getHeader('User-Agent')?.[0] || ''

  // Detect crawlers via the full UA RegExp (link above). With Bot Manager,
  // combine it with request.botScore.responseSegment.isHuman() to skip humans
  // and request.botScore.responseSegment.isAggressiveResponse() to drop
  // hostile traffic before it consumes renders.
  if (!BOT_RE.test(ua)) {
    return httpRequest(request.url) // humans get the regular SPA
  }

  const pageUrl = request.scheme + '://' + request.host + request.url

  // GET https://render.ostr.io/?url=<encoded page URL>&bot=<encoded bot UA>
  // The bot query parameter forwards the crawler's original user-agent.
  return httpRequest(
    `https://render.ostr.io/?url=${encodeURIComponent(pageUrl)}&bot=${encodeURIComponent(ua)}`,
    {
      headers: {
        // Token from the ostr.io dashboard integration guide, starts with "Basic ..."
        Authorization: 'Basic <your-token>',
      },
    }
  )
}
```

## Fits when

- Site is already on Akamai with EdgeWorkers enabled.
- You have Bot Manager for sophisticated classification beyond user-agent.
- Compliance requires keeping all edge logic on Akamai.

## Avoid when

- EdgeWorkers add cost without offsetting indexation gain at your traffic volume.
- You can run the same logic on Cloudflare or Vercel for less.

## Common pitfalls

- **EdgeWorker quota and resource tier** — EdgeWorkers have CPU and memory quotas per tier. The bot-routing logic is light, but combining it with other workers can exhaust the budget. Monitor execution metrics in Akamai Control Center.
- **Property Manager rules conflicting with worker routing** — EdgeWorker route() decisions can be overridden by upstream Property Manager rules. Verify that origin selection happens at the EdgeWorker level, not earlier in the rule pipeline.
- **Bot Manager false positives blocking real crawlers** — Aggressive Bot Manager scores can flag Googlebot or Bingbot as suspicious. Combine Bot Score with verified-bot allowlists for major crawlers to avoid accidentally blocking legitimate fetches.

## Related

- [Bot Detection and Offloading via Prerendering](/blog/bot-detection-and-offloading-bot-visits.md)
