Capture on Deploy from Netlify, Vercel and Cloudflare Pages
Netlify, Vercel and Cloudflare Pages can each send a POST to a URL when a deploy has succeeded. Enter your site's publish hook as that URL and WRL checks the site after each deploy. Nothing in your repository changes.
| Platform | Where the hook URL goes | Event | Plan |
|---|---|---|---|
| Netlify | A deploy notification of the type HTTP POST request | Deploy succeeded | Netlify's docs name none |
| Vercel | A webhook in the team's settings | Deployment Promoted | Pro or Enterprise |
| Cloudflare Pages | A webhook destination that a Pages notification delivers to | Deployment success | All plans |
A deploy notification describes the deploy. It doesn't list the pages that changed, so WRL reads your sitemap after each call and captures the pages that are new or that have a later <lastmod> than their latest capture. To name the changed pages yourself, use the GitHub Actions workflow.
Prerequisites
- The site's hook URL. In the dashboard, open Sites, select your site, open Settings and choose Create a hook URL. Create the publish hook has the API call. WRL shows the URL once.
- A sitemap on the site's host. Set up a site says where WRL looks for it.
The hook takes no API key: the URL is the secret, and on each of these platforms it is stored in the platform's settings. If the URL leaks says what someone else could do with it and how to replace it.
Netlify
In Netlify, open your project, then Project configuration, then Notifications, then Deploy notifications. Choose Add notification and the type HTTP POST request, select the event Deploy succeeded and enter the hook URL. Leave the JWS secret token empty.
Netlify's docs say the event fires when Netlify has uploaded the new deploy to its CDN. The body of the call is a JSON object that describes the deploy. With a JWS secret token, Netlify also signs the body and sends the signature in the X-Webhook-Signature header. WRL doesn't check that signature, so the token has no use here.
Netlify's docs name a plan for email notifications (Pro and Enterprise) and none for HTTP POST requests. They also don't say that Deploy succeeded is limited to production deploys. If Netlify calls the hook after a Deploy Preview too, WRL checks your production site once more and finds nothing new.
Vercel
Vercel has webhooks for a team's account on the Pro and Enterprise plans. Without one of those plans, use the GitHub Actions workflow for deployments by a platform, which needs no Vercel webhook.
- Choose your team in the Vercel dashboard and open Settings, then Webhooks.
- Select the event Deployment Promoted.
- As the target, choose the project that builds your site, so that other projects' deployments don't call the hook.
- Enter the hook URL as the endpoint URL and choose Create Webhook.
The dialog that follows shows a secret for verifying Vercel's signature. WRL doesn't verify it, so you don't need to keep the secret.
Vercel sends Deployment Promoted (deployment.promoted in its API docs) when a production deployment starts to serve production traffic, automatically after a build or after vercel promote. It doesn't send it for a rollback.
Deployment Succeeded (deployment.succeeded) works too. Vercel sends it when any deployment is ready, preview deployments included. Whether a deployment is for production is in the body, under payload.target, and WRL doesn't read the body. So a preview deployment starts a check too. That check finds nothing new on your production site, and the call counts toward the 60 calls the hook takes in an hour.
Each call is a JSON object with id, type, createdAt, payload and region, and Vercel signs it in the x-vercel-signature header. When a call doesn't get a 2xx answer, for example a 429 from the hook, Vercel sends it again for up to 24 hours.
Cloudflare Pages
Cloudflare reports deployments through its notifications. You create a webhook destination with the hook URL, then a notification for your Pages project that delivers to it. Both are included with all Cloudflare plans.
- In the Cloudflare dashboard, go to Alerts, then Destinations. In the Webhooks card, select Create. Name the webhook, enter the hook URL in the URL field, leave Secret empty and select Save and Test.
- Go to Alerts, then Platform Notifications, and select Create a Notification. Under Pages, choose Project updates.
- In the wizard, choose your Pages project, its production environment and the event Deployment success. Name the notification, add the webhook as its delivery destination and select Create.
Save and Test posts a test message to the URL. For the hook that is a call like any other: WRL answers 202 and queues a check, the site's first one if it had none.
Cloudflare's calls are JSON objects with name, text, data and ts, among other fields. If you enter a secret, Cloudflare sends it in the cf-webhook-auth header of each call. WRL reads neither.
To send a test later, open the notification's action menu and choose Test.
What WRL does with the call
All three platforms post their own JSON and sign it in their own way. WRL uses none of it. A hook call names pages with a list under urls or urlList, or as plain text with one address per line. These bodies have no such list, so WRL answers 202 and queues a check:
{ "site": "example.com", "mode": "check", "status": "queued" }
The check starts within about a minute. A site gets at most one check every 5 minutes, so several deploys in a row lead to one or two checks. A check always runs after the last call. The hook takes 60 calls an hour per site and answers 429 beyond that. Capture on Publish lists the other answers.
What a check finds after a deploy
A check captures the pages in your sitemap that your account has no capture of, then the pages whose <lastmod> is later than their latest capture, up to the site's maxCapturesPerCheck (100 by default). What it finds depends on what your generator writes into the sitemap:
- Each page has its own
<lastmod>, the date the page last changed. A check finds new pages and edited ones. A date without a time counts from the start of that day in UTC, so a check misses an edit made on a day when the page already has a capture. - The sitemap has no
<lastmod>. A check finds new pages and never an edited one. - Each page has the time of the build as its
<lastmod>. After each deploy all pages look edited, and WRL captures the site again, up tomaxCapturesPerCheckpages with each check. A site of 300 pages then costs up to 300 captures per deploy.
After the first deploy, look at what the check found, as in Check that it works. withLastmod counts the pages that have a date, and allStamped is true when more than half of the pages changed at once and one check couldn't take them all.
For the last two kinds of sitemap, change the generator's settings so that <lastmod> is each page's own date. If it can't do that, leave <lastmod> out and name the edited pages in the hook call, as the GitHub Actions workflow does.
A change to a template or a stylesheet changes pages without changing their dates. After such a deploy, capture the affected pages in a batch.
Check that it works
Deploy the site, for example by pushing a commit, and wait two minutes. In the dashboard, the site's Settings page then says when the hook was last called and that the call asked for a check, and shows the result of the last check. With the API:
curl https://api.webresourceledger.com/v1/sites/example.com \
-H "Authorization: Bearer YOUR_API_KEY"
Part of the answer:
{
"host": "example.com",
"settings": {
"hook": {
"createdAt": "2026-11-29T10:02:11.000Z",
"lastCallAt": "2026-11-29T14:31:07.000Z",
"lastCall": { "mode": "check" }
},
"lastCheckAt": "2026-11-29T14:32:00.000Z",
"lastCheck": {
"pagesRead": 312,
"withLastmod": 312,
"newPages": 2,
"changedPages": 5,
"allStamped": false,
"captured": 7,
"leftOutCount": 0
}
}
}
If lastCallAt is still null, the platform hasn't reached the hook. Check that the URL in its settings is complete: it ends in wrlh_ and 43 more characters. A hook URL that was replaced answers 404. To rule out the platform, call the hook yourself with curl -X POST and the URL.
Related
- Capture on Publish: the hook's answers, limits and what a leaked URL allows
- Capture on Deploy with GitHub Actions: name the pages a push changed, and the way for a Vercel plan without webhooks
- Capture on Publish from a Headless CMS: when the content comes from a CMS
- Sites and Page History: see what is on record