How AI is powering better personalization in e-commerce [with Vercel]. Sign up now

How to trigger Netlify redeploy from Sanity when content changes?

24 repliesLast updated: Dec 2, 2025

I love Sanity and have been using it for the content for a site I have deployed to Netlify. My question: is there a way to trigger a Netlify redeploy from Sanity when my content changes? I see a dashboard widget -- "Netlify Deploy" -- and a plugin -- "Netlify Deploy Status Badge" -- which both appear to do the trick. But I'm looking for feedback. best practices, and where I can look to find a 'how to...' Thanks!
AI Update

Great question! Yes, you can absolutely trigger a Netlify redeploy when your Sanity content changes. Let me walk you through your best options.

The Standard Approach: GROQ-Powered Webhooks

The most reliable, production-ready way to trigger Netlify builds is using Sanity's GROQ-powered webhooks. This is the official, mature feature designed exactly for this use case. Here's how it works:

The webhooks documentation has excellent guides on using filters and projections to fine-tune exactly when your webhook fires.

The Dashboard Widget: Manual Control

The Netlify plugin you mentioned (also known as "Netlify Deploy" or sanity-plugin-netlify) is perfect if you want manual control over deployments. It adds a deploy tool to your Studio where editors can:

Install it with:

npm install sanity-plugin-netlify

Then add it to your sanity.config.ts:

import { defineConfig } from 'sanity'
import { netlifyTool } from 'sanity-plugin-netlify'

export default defineConfig({
  // ...
  plugins: [
    netlifyTool(),
  ],
})

This approach is great for avoiding unnecessary builds on every content save, and gives content editors visibility into deployment status directly in Studio.

Best Practices

Avoid build storms: Don't trigger on every single save. Consider:

Security: Keep your Netlify build hook URL private - anyone with it can trigger builds

Editor experience: The dashboard widget gives editors clear feedback about deployment status, which webhooks alone don't provide

My Recommendation

For most production sites, I'd suggest:

Or use just the dashboard widget if you want full editorial control and to minimize build usage.

The webhook + widget combo gives you the best of both worlds: automatic deploys for published content, plus visibility and manual control when needed. Check out this community answer for a real-world walkthrough of the setup process.

Quick webhook setup example:

This will trigger a Netlify rebuild whenever you publish content in Sanity!

Show original thread
24 replies

Was this answer helpful?

Sanity – Build the way you think, not the way your CMS thinks

Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.

Related contributions