Deploy your Prerender worker on Cloudflare
JL

Jacint Lazok

Created Oct 17, 2023

Deploy your Prerender worker on Cloudflare

433
    d

Cloudflare dashboard

5 Steps
1

Click on Workers & Pages on the left side

amdhjsgfaskjdfgv

Click on Workers & Pages on the left side
2

Click on Create Worker

Click on Create Worker
3

Give your worker a name.

Give your worker a name.
4

Click on the Deploy button at the bottom right.

Click on the Deploy button at the bottom right.
5

Click on Edit code

Click on Edit code
    g

Copy the Cloudflare worker's source code from this link.

15 Steps
6

Replace the example code with the worker's source code

Replace the example code with the worker's source code
7

Click on Save and deploy

Click on Save and deploy
8

Click on Save and deploy again in the pop-up modal

Click on Save and deploy again in the pop-up modal
9

Step back to the previous interface by clicking on the name of your worker on the top left.

Step back to the previous interface by clicking on the name of your worker on the top left.
10

Click on Triggers

Click on Triggers
11

Click on Add route

Click on Add route
12

Type in your domain like this *example.com/*

Type in your domain like this *example.com/*
13

Select the Zone where your site is.

Select the Zone where your site is.
14

Click on Add route

Click on Add route
15

Click on the Settings

Click on the Settings
16

Select Variables on the left side.

Select Variables on the left side.
17

Click on Add a Variable

Click on Add a Variable
18

Copy your Prerender token from your dashboard

You can find it at the top left on your Prerender dashboard.

Copy your Prerender token from your dashboard
19

The name of the variable should be "PRERENDER_TOKEN" and the value should be the token you copied from your dashboard. Then click on Save and deploy

The name of the variable should be "PRERENDER_TOKEN" and the value should be the token you copied from your dashboard. Then click on Save and deploy
20

Your Cloudflare worker should work.

Your Prerender integration should be working now

Your Cloudflare worker should work.
Well done!
Create how-to guides like this in a snap. Get Tango now.