NEW:Turn AI visibility insights into ChatGPT ad creative.

Netlify setup

Use a narrowly scoped Netlify Edge Function or serverless integration to serve crawler-readable HTML safely.

On this page

Use the Edge Function for routing, not authorization

On Netlify, a common approach is an Edge Function that runs before public page requests. It should pass normal visitors through unchanged and route only known crawler user agents for public HTML pages.

Keep the route scope narrow. Skip static assets, API endpoints, authentication, account, checkout, dashboard, preview, and other private routes.

Keep secrets out of the browser

Store the render-service URL and API key in Netlify environment variables. Read them only inside the Edge Function or a serverless function. Never prefix a secret with VITE_, place it in frontend code, or commit it to the repository.

Use a clear fallback

If the rendering service is unavailable, return an explicit temporary failure for the crawler path rather than silently serving incorrect or private content. Normal visitor traffic should continue to the original Netlify site.

Verify production behavior

Deploy the function, then test a public route with a normal request and a crawler-style request. Confirm that assets and private routes bypass the function, while the crawler response contains the expected public HTML and stable metadata.

Netlify Function and Edge Function usage is metered. Monitor request volume, bandwidth, and function compute after enabling an all-route Edge Function.

Instructions for your connected site

Open account setup for domain-specific values, diagnostics and copy-ready configuration. These stay private to your workspace.