
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeThe solution depends on where your Sanity Studio is hosted. There are two main scenarios:
If you've deployed your Studio to your own domain (using sanity build to create static files and hosting on Vercel, Netlify, or another platform), you have full control over the domain and can use any of Facebook's verification methods:
Option 1: Add HTML file - Place the verification HTML file in your Studio's static folder before building. Files in this folder get copied to the root of your build output.
Option 2: Add meta tag - You can customize the HTML document by creating a custom index.html template in your Studio project, though this requires ejecting from the default build process.
Option 3: DNS TXT record (easiest) - Since you control the domain, just add the TXT record through your DNS provider. This doesn't require any changes to your Studio code.
If your Studio is hosted on Sanity's infrastructure at a yourproject.sanity.studio subdomain, you don't have direct control to add verification files or meta tags to that domain.
Best solution: Verify a different domain that you control (like your Next.js frontend) and make Facebook API calls from there instead. You can:
/api/facebook-publish)This keeps Facebook credentials secure on your server and gives you a verified domain for the Graph API.
If you're unsure, check your Studio URL:
yourproject.sanity.studio = Sanity-hosted (limited customization)For self-hosted Studios, the sanity build command creates static files you can deploy anywhere, giving you full control over the hosting environment and the ability to add verification files, meta tags, or DNS records as needed.
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.
Content operations
Content backend


The only platform powering content operations
By Industry


Tecovas strengthens their customer connections
Build and Share

Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag store