Start here

Setup Guide

Connect Prerender Buddy with no-code DNS setup or developer middleware.

Setup Guide

Use this guide to connect a website, verify that crawlers receive readable HTML, and avoid the most common setup mistakes.

The short version

Start with the setup that matches how much control you have over the website.

  • Easy: use this for Lovable, Bolt, Base44, static builders, and simple marketing sites. You add one DNS record.
  • Normal: use this for Vercel, Netlify, Cloudflare, Next.js, or any platform that supports middleware or edge functions.
  • Advanced: use this for Express, Nginx, custom servers, and teams that control the backend.

If you are not sure, start with Easy. You can switch to Normal or Advanced later.

Easy setup: DNS managed by Prerender Buddy

Use this when your website cannot run code before the React app loads.

Good fit for:

  • Lovable
  • Bolt
  • Base44
  • v0 or similar AI builders
  • static React, Vue, or Vite apps
  • any host where the public domain can point to Prerender Buddy

What happens:

Request flow
1Crawler visits www.example.com
2  -> Prerender Buddy receives the request
3  -> crawler gets rendered HTML
4 
5Human visits www.example.com
6  -> Prerender Buddy forwards the request
7  -> visitor sees the normal website

You need two values.

Public website address

This is the domain people already know.

Example
1www.example.com

Start with www when possible. It is usually easier to set up than the root domain.

Current website location

This is where the normal website still loads today.

URL examples
1https://example.netlify.app
2https://example.vercel.app
3https://project-name.lovable.app
4https://example-production.up.railway.app
5https://origin.example.com

This value is important. It must be different from the public website address.

Wrong:

Example
1Public website address: www.example.com
2Current website location: https://www.example.com

That creates a loop after DNS is changed. Use the platform URL or a separate origin hostname instead.

Easy setup DNS record

For a www hostname, add this record where DNS is managed:

DNS record
1Type:  CNAME
2Name:  www
3Value: customers.prerenderbuddy.com

Prerender Buddy may also show TXT records for ownership or HTTPS validation. Add those records at the same DNS provider as the CNAME.

Check how your DNS provider handles the Name / Host field:

Example
1If the DNS UI auto-appends example.com:
2Name / Host: _acme-challenge.www
3 
4If the DNS UI expects the full record name:
5Name / Host: _acme-challenge.www.example.com

Do not create duplicate TXT records for the same validation. After saving TXT changes, wait 5-15 minutes for DNS propagation, then click Refresh status. Avoid Reset proxy setup unless validation stays stuck for hours.

Root domain and www

Root and www are different hostnames.

Example
1example.com
2www.example.com

Prerender Buddy protects the exact hostname you add. If you add www.example.com, then example.com is not automatically protected unless it redirects to www or is configured separately.

Recommended setup for most sites:

  1. Protect www.example.com with Prerender Buddy.
  2. Redirect example.com to https://www.example.com.
  3. Submit the www sitemap in Google Search Console.
  4. Verify both versions with the visibility checker.

The redirect must preserve the path:

Request flow
1https://example.com/blog/article
2  -> https://www.example.com/blog/article

Some DNS providers support ALIAS, ANAME, or CNAME flattening for the root domain. If yours does, you can point the root domain to Prerender Buddy too. If not, use a redirect.

Namecheap root-to-www redirect

If www.example.com is already pointed to Prerender Buddy and you want the root domain to redirect to it:

DNS record
1Type:  URL Redirect Record
2Host:  @
3Value: https://www.example.com/
4Mode:  Permanent 301, unmasked

Keep the www CNAME pointing to Prerender Buddy:

DNS record
1Type:  CNAME
2Name:  www
3Value: customers.prerenderbuddy.com

After saving, test a deep URL. If the DNS provider redirects every path to the homepage, use a Cloudflare redirect rule instead.

Cloudflare root-to-www redirect

Use a Redirect Rule:

Example
1If hostname equals example.com
2Redirect to https://www.example.com${uri.path}
3Status code 301
4Preserve query string: yes

Normal setup: platform middleware

Use this when the website host can run code before returning HTML.

Good fit for:

  • Vercel middleware
  • Next.js middleware
  • Netlify Edge Functions
  • Cloudflare Workers
  • platforms where an AI builder can add edge code for you

What happens:

Request flow
1Crawler visits your site
2  -> middleware detects crawler User-Agent
3  -> middleware calls Prerender Buddy
4  -> crawler receives rendered HTML

DNS stays unchanged. The API key must be stored as a server-side secret.

Environment variable
1PRERENDER_BUDDY_API_KEY=your_site_api_key

Never put this key in browser JavaScript, public frontend code, or an AI-builder prompt.

When an API key is needed

You need an API key only for Normal or Advanced setup.

Use an API key when the target website will call Prerender Buddy from:

  • Vercel or Next.js middleware
  • Netlify Edge Functions
  • Cloudflare Workers
  • Express or another server
  • Nginx or another reverse proxy
  • any custom backend or request middleware

You do not need an API key for Easy DNS setup. In Easy setup, Prerender Buddy handles crawler rendering through the managed proxy.

Where to find the API key

In the Prerender Buddy dashboard:

  1. Open Profile & API Keys.
  2. Create a new API key.
  3. Copy the key once.
  4. Add it to the target website host as a server-side secret.

Use this exact environment variable name:

Environment variable
1PRERENDER_BUDDY_API_KEY

The value should be the API key from the dashboard.

Where to add the API key

Add the key to the website you are protecting, not to Prerender Buddy.

Request flow
1Vercel: Project Settings -> Environment Variables
2Netlify: Site configuration -> Environment variables
3Cloudflare: Worker -> Settings -> Variables and Secrets
4Railway: Service -> Variables
5Render/Fly/other server hosts: service environment variables

The key must be available to server-side code only. Do not add it with a public frontend prefix such as VITE_, NEXT_PUBLIC_, or PUBLIC_.

Render API endpoint

Developer integrations call:

URL examples
1https://api.prerenderbuddy.com/render?url=https://www.example.com/page

Send the API key in this header:

Environment variable
1X-Prerender-Token: value-of-PRERENDER_BUDDY_API_KEY

The crawler receives the rendered HTML response. Normal visitors should continue to receive the original website response.

Where to get integration examples

Generated snippets live inside each site's dashboard because they use that site's exact domain and setup mode.

In the Prerender Buddy dashboard:

  1. Open Sites.
  2. Open the website you are connecting.
  3. Open the Integration tab.
  4. Choose the closest setup option.

Available options include:

Example
1AI builder
2Static hosts
3Vercel
4Netlify
5Cloudflare
6Express
7Nginx

The public docs explain which path to choose. The site dashboard gives you the exact prompt or snippet for that site.

Advanced setup: server or reverse proxy

Use this when you control the backend.

Good fit for:

  • Express
  • Fastify
  • Rails, Laravel, Django, or similar server apps
  • Nginx or another reverse proxy
  • custom deployment stacks

The same rules apply:

  1. Run before HTML is returned.
  2. Only intercept GET requests for public pages.
  3. Skip API routes and static files.
  4. Detect crawler User-Agent strings.
  5. Fetch rendered HTML from Prerender Buddy.
  6. Return that HTML to the crawler.
  7. Let normal visitors continue to the original app.

Integration guidelines

Keep the integration narrow.

  • Do not change the website UI.
  • Do not change authentication, billing, routes, or app logic.
  • Do not add crawler checks inside browser-only React code.
  • Do not expose PRERENDER_BUDDY_API_KEY to the browser.
  • Do skip JavaScript, CSS, images, fonts, JSON, XML, text files, and sourcemaps.
  • Do test the exact hostname configured in Prerender Buddy.

What to verify

After DNS or middleware is deployed, open the site in the Prerender Buddy dashboard and click Verify Installation.

Good result:

Example
1Integration connected
2Crawler traffic reached Prerender Buddy successfully.

Then open the Logs tab. You should see a recent crawler request such as Googlebot, GPTBot, ClaudeBot, PerplexityBot, Applebot, or Bingbot.

Verify the exact hostname you configured. These are different tests:

URL examples
1https://example.com
2https://www.example.com

If one works and the other returns the original app shell, add a redirect or configure both hostnames.

Manual crawler test

You can also test from a terminal.

Terminal
1curl -L -A "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" https://www.example.com
2curl -L -A "Mozilla/5.0 (compatible; GPTBot/1.0; +https://openai.com/gptbot)" https://www.example.com
3curl -L -A "Mozilla/5.0 (compatible; ClaudeBot/1.0; +https://anthropic.com)" https://www.example.com

Good output includes real page text, a title, headings, and meaningful content.

For managed proxy setup, good response headers usually include:

Example
1x-prerender-cache
2x-prerender-cache-ttl
3x-prerender-time

If you see only the original hosting headers and no Prerender Buddy headers, the request is not reaching the managed proxy.

Bad output usually looks like a JavaScript shell:

HTML
1<div id="root"></div>
2<script src="/assets/..."></script>

Cache behavior

A cache miss means Prerender Buddy rendered fresh HTML.

A cache hit means Prerender Buddy already had a recent rendered version and served it quickly.

Both are normal. Cache hits should usually be much faster.

Ready to check the setup?

After DNS or middleware is deployed, use Verify Installation from the site dashboard and check the logs tab for crawler requests.

Still stuck? Email support@prerenderbuddy.com.

Open dashboard