Step-by-step integration instructions for ostr.io pre-rendering via CloudFlare Workers
- Sign up for ostr.io
- Add server/domain following on-boarding guidance
- Verify domain ownership using
DNS TXT
record adding via CloudFlare interface - Inside server's panel click on add next to "Pre-rendering & SSR for SEO"
- Inside server's pre-rendering panel scroll down to integration guide
- In the first CURL tab grab "Authorization Header" starting from
Basic...
and ending with closing double-quotes - Create CF Worker:
- Workers > Create: Create Worker via CloudFlare Dashboard
- Workers > Settings > Variables: Place copied header as
OSTR_AUTH
to WebWorker's environment variables OR replaceenv.OSTR_AUTH
with Authentication Header value from step 6 - Workers > Settings > Edit Code: Paste CF Worker Code
- Connect Worker to a website
- Websites > example.com > Workers Routes > [Add Route]
- Route:
*.example.com/*
- Worker: Select newly created worker
- Click on save
- Purge cache: Websites > example.com > Caching > Configuration > Purge Everything
- Check
X-Prerender-Id
header to confirm that pre-rendering works- Request using cURL:
curl -v -A GoogleBot https://example.com/
- Ensure
X-Prerender-Id
header returned with response - Check ostr.io: Rendering statistics will appear in real-time
- Request using cURL:
- Further reading: