How to add a Permissions-Policy header
Permissions-Policy lets a page say which powerful browser features, such as the camera, microphone and geolocation, it and the content embedded in it may use. Turning off what you don't need means a compromised script or an embedded third party can't use them either.
Updated 2026-10-23
Why it matters
- It limits what injected or embedded code can ask the visitor for.
- Features listed with empty parentheses are off for everyone, including embedded frames.
How to fix it
- Add this header to every response from example.com.
Pick what your site runs on. Replace example.com with your own domain where it appears.
After you deploy, re-check the site. A CDN or the browser cache can keep serving the old headers for a few minutes.
nginx
add_header Permissions-Policy "camera=(), microphone=(), geolocation=()" always;
Apache
Header always set Permissions-Policy "camera=(), microphone=(), geolocation=()"
Caddy
header {
Permissions-Policy "camera=(), microphone=(), geolocation=()"
}Cloudflare
Permissions-Policy: camera=(), microphone=(), geolocation=()
Vercel
{
"headers": [
{
"source": "/(.*)",
"headers": [
{
"key": "Permissions-Policy",
"value": "camera=(), microphone=(), geolocation=()"
}
]
}
]
}Netlify
/* Permissions-Policy: camera=(), microphone=(), geolocation=()
Next.js
const nextConfig = {
async headers() {
return [
{
source: "/(.*)",
headers: [
{ key: "Permissions-Policy", value: "camera=(), microphone=(), geolocation=()" },
],
},
];
},
};
export default nextConfig;Express
app.use((req, res, next) => {
res.setHeader("Permissions-Policy", "camera=(), microphone=(), geolocation=()");
next();
});Common mistakes
- Switching off a feature your site uses, such as geolocation on a store locator. List only what you never use.
- Using the old Feature-Policy header name. It was renamed; use Permissions-Policy.
Check that it worked
Run your domain through the free security headers checker. It takes a few seconds, needs no account, and shows anything still missing.
Open the security headers checkerQuestions
- What does the example turn off?
- camera=(), microphone=(), geolocation=() disables the camera, the microphone and location for your pages and everything embedded in them. Add more features, such as payment=(), the same way.
Related guides
Don't want to check by hand? Upzy watches your site around the clock and tells you when a header, certificate or email record slips. Start free.