Skip to content

Cloudflare

Use this page when the site’s domain is set up through Cloudflare. The DNS can be at Cloudflare even if the pages themselves are built elsewhere; see WordPress and site builders.

A Worker. The app shows it under Setup → Connect your website with the values filled in; copy it from there with Copy setup snippet. The shape is:

addEventListener("fetch", (event) => {
const url = new URL(event.request.url);
const target = "https://proxy.simplifylocal.app/<business-id>" + url.pathname + url.search;
event.respondWith(fetch(new Request(target, event.request)));
});

<business-id> is filled in by the app. Do not type it by hand.

  1. Open dash.cloudflare.com and sign in. From the account home, go to Workers & Pages → Create application → Create Worker.
  2. Give the Worker a name (anything works, e.g. simplifylocal). Click Deploy.
  3. Click Edit code. Replace the example with the snippet, then click Save and Deploy.
  4. Back at the account home, click the site that matches the web address.
  5. Go to Workers Routes → Add route. Set the route to the address with the project-page path on the end, yourbusiness.com/work/*, then pick the Worker you just deployed.

The route must cover /work* on the site’s own host. Add only this one route; do not add a route for /_next/*.

Back in the app, click I added it. Check now. See Verify the connection for what each result means.

If the check reports We can’t reach your site, wait a couple of minutes and run it again without changing the snippet. Worker routes can take a moment to propagate.