Website Security Headers Checklist: CSP, HSTS, Permissions Policy, and Safe Deployment
website securityCSPHSTSHTTP security headersPermissions Policyweb browsers

Website Security Headers Checklist: CSP, HSTS, Permissions Policy, and Safe Deployment

SSecuring.website Editorial Team
2026-11-18
8 min read

A practical checklist for configuring CSP, HSTS, Permissions-Policy, cookies, testing, deployment, and rollback without breaking a website.

A practical website security headers checklist for reviewing CSP, HSTS, cookie attributes, Permissions-Policy, testing, deployment, and rollback procedures before or after a website change.

Overview

HTTP security headers let a website communicate security instructions to browsers. They can reduce the impact of cross-site scripting, clickjacking, content-type confusion, accidental information disclosure, and unnecessary access to browser features. Headers are not a replacement for secure application code, patching, access control, or a sound website security process, but they are an important layer in a broader cybersecurity compliance and website security program.

The right configuration depends on how the site works. A static marketing site may need only a small policy. A content management system, ecommerce site, customer portal, or SaaS application may load scripts, frames, images, fonts, APIs, payment widgets, analytics, and support tools from several origins. A restrictive policy deployed without inventory can break legitimate functionality; a permissive policy can provide little protection.

Use this checklist as a change-management guide. Record the current headers, identify every required origin, test changes in a non-production environment where possible, deploy in stages, and retain evidence of the review. Recheck the list after a redesign, CMS or plugin change, domain migration, hosting move, or recurring security scan.

Quick reference

ControlPrimary purposeDeployment note
Content-Security-PolicyRestricts where content can load and how it can executeStart with inventory and Report-Only testing; policy syntax is site-specific
Strict-Transport-SecurityInstructs browsers to use HTTPS for a defined periodUse only when HTTPS is reliable across the intended hostnames
X-Content-Type-OptionsHelps prevent MIME-type sniffingUsually paired with the value nosniff
Referrer-PolicyControls how much referrer information is sentChoose a setting consistent with analytics and privacy needs
Permissions-PolicyLimits access to selected browser featuresReview feature names and syntax as browser behavior evolves
Cookie attributesReduce exposure of session and preference cookiesSet attributes on the cookie response, not as a general response header

Browser behavior and supported directives can change. Treat the table as a planning reference rather than a substitute for testing the browsers and platforms your users actually rely on.

Checklist by scenario

1. Establish a baseline before changing anything

  • Capture headers from the homepage, login, account, checkout, API, and error responses where relevant.
  • Check both the bare domain and common subdomains, including redirects between HTTP and HTTPS.
  • Record which layer adds each header: application code, web server, CDN, reverse proxy, hosting platform, or security service.
  • List external resources used by the site: scripts, stylesheets, fonts, images, frames, media, APIs, payment services, analytics, chat, and tag managers.
  • Identify whether the site uses inline scripts, inline styles, dynamic code, WebSockets, service workers, uploads, or embedded documents.
  • Save a baseline report and screenshots of important user journeys so a rollback can be verified.

2. Deploy Content-Security-Policy carefully

CSP is usually the most detailed and disruptive header. It defines permitted sources and behaviors for content such as scripts, styles, images, fonts, frames, connections, and workers. A starting policy might look like this:

Content-Security-Policy: default-src 'self'; object-src 'none'; base-uri 'self'; frame-ancestors 'self';

This is an example, not a universal production policy. Add only the sources the application genuinely needs. Common directives include script-src, style-src, img-src, font-src, connect-src, frame-src, worker-src, and form-action. Consider frame-ancestors to control which sites may embed your pages and object-src 'none' when legacy plugin content is not required.

  • Begin with Content-Security-Policy-Report-Only to observe violations without blocking content.
  • Review reports for legitimate resources and unexpected origins; do not automatically allow every reported domain.
  • Prefer nonces or hashes for necessary inline code rather than broadly allowing unsafe-inline, where the application architecture supports them.
  • Avoid unsafe-eval unless a documented dependency requires it and the risk has been accepted.
  • Define a reporting destination only after confirming that reports will be collected, protected, and reviewed.
  • Move from monitoring to enforcement gradually, beginning with representative pages and critical workflows.

3. Configure HTTPS and HSTS

Use HTTPS for all pages, assets, forms, administrative paths, and API traffic. Redirect HTTP to HTTPS, confirm that redirects do not create loops, and check that certificates cover every hostname users are expected to visit.

HSTS tells a browser to use HTTPS for a specified period. A basic form is:

Strict-Transport-Security: max-age=31536000

Only increase the scope after confirming that HTTPS works consistently. The includeSubDomains option affects subordinate hostnames, including ones that may be managed separately. Treat any preload-related decision as a separate, carefully reviewed commitment; it can make recovery from an overlooked HTTP-only service more difficult. HSTS does not protect a visitor's first connection before the browser has received the policy, so it should be considered alongside secure redirects, certificate management, and DNS and hosting controls.

4. Add baseline browser controls

  • X-Content-Type-Options: use nosniff and verify that servers send accurate Content-Type values for scripts, styles, images, downloads, and APIs.
  • Referrer-Policy: select a policy that limits unnecessary URL disclosure while preserving any documented measurement needs. Review pages that may contain identifiers or sensitive query parameters.
  • Permissions-Policy: explicitly limit browser features the site does not need, such as camera, microphone, geolocation, or payment-related capabilities. Validate the directive names and syntax against current browser documentation and test embedded services.
  • Framing controls: use CSP frame-ancestors for modern policy control. An X-Frame-Options value may still be useful for compatibility, but do not assume the two controls have identical capabilities.

5. Secure cookies and sessions

Review every session, authentication, preference, and consent cookie. Where appropriate, set Secure so the cookie is sent only over HTTPS, HttpOnly so client-side scripts cannot read it, and an intentional SameSite value to control cross-site requests. Define the narrowest practical Domain and Path; broad scope increases exposure if another subdomain is compromised. Confirm that login, logout, password reset, payment, and federated sign-in flows still work after changes.

6. Match the deployment method to the platform

  • CDN or edge platform: check whether headers are added before or after cached responses, and purge or revalidate cached objects after a policy change.
  • Nginx or Apache: configure headers at the correct virtual host or location, then test redirects, error pages, static files, and proxied application responses.
  • Managed hosting: look for platform-level security-header settings and confirm whether the application or platform takes precedence.
  • Application framework: use its supported middleware or response configuration, and ensure API and HTML routes receive appropriate—not blindly identical—headers.

Keep one authoritative configuration where possible. Duplicate header declarations can create confusing results, particularly when a CDN, web server, and application each set a policy.

What to double-check

  • Test the homepage, navigation, search, forms, authentication, file uploads, checkout, account settings, embedded media, and customer-support tools.
  • Inspect browser developer-console messages and network responses, not just a single online scanner result.
  • Test mobile and desktop layouts, authenticated and unauthenticated states, redirect responses, and representative error pages.
  • Confirm that consent tools and privacy controls still behave as intended. A security header does not by itself satisfy cookie consent requirements or create a privacy notice.
  • Verify that CSP reports exclude secrets and personal data where possible, and restrict access to the reporting endpoint.
  • Check cache behavior so an old policy is not served for some users while a new policy is served for others.
  • Document each permitted third-party origin, its business purpose, data flows, owner, and review date. This record supports wider vendor risk and data protection reviews.
  • Save test evidence, the approved configuration, deployment timestamp, owner, and rollback version. These records can support a repeatable website compliance audit.

For broader coverage, pair this review with a website security and compliance audit checklist. Domain and hosting controls should also be reviewed separately; security headers cannot compensate for weak registrar access, DNS changes, or certificate administration. See the DNS security guide for that layer.

Common mistakes

  • Copying a generic CSP: a policy that works for one site may block scripts, APIs, fonts, or payment flows on another.
  • Allowing broad wildcards: * and large source lists can weaken the control and make future review difficult.
  • Enabling HSTS too early: forgotten subdomains or HTTP-only services can become inaccessible after a wider policy is received.
  • Testing only the homepage: login, checkout, admin, and embedded workflows often use different resources.
  • Relying on scanners alone: scanners can identify missing or unusual headers, but they do not know whether a third-party origin is required or trusted.
  • Ignoring duplicate configuration: conflicting values across the CDN, server, and application make troubleshooting harder.
  • Assuming headers fix vulnerable code: secure headers reduce browser-side risk; they do not repair injection flaws, broken authorization, outdated dependencies, or exposed secrets.
  • Failing to plan rollback: every enforcement change should have a known previous configuration and a person authorized to restore it.

When to revisit

Review this checklist before seasonal planning cycles and whenever the site's workflows or tools change. At minimum, schedule a periodic review that confirms the headers still match the current application, hosting architecture, browser behavior, and third-party inventory. Do not wait for a review date after a security incident, unexpected CSP violation, domain migration, CDN change, CMS upgrade, plugin installation, analytics change, payment integration, new subdomain, or certificate and DNS change.

Use a simple change record: what changed, which headers were affected, what was tested, who approved the deployment, what evidence was retained, and how to roll back. After deployment, monitor violations and user-impact signals, then close or document each finding. If a policy change affects personal data flows or a service provider, connect the technical review to your data map, vendor assessment, and incident response process. Relevant supporting resources include the vendor risk assessment checklist, incident response plan template, and compliance evidence checklist.

Action plan: capture today's headers, inventory required origins, deploy CSP in Report-Only mode, test critical journeys, apply baseline controls, stage HSTS carefully, document the configuration, and schedule the next review after the next planned site or platform change.

Related Topics

#website security#CSP#HSTS#HTTP security headers#Permissions Policy#web browsers
S

Securing.website Editorial Team

Cybersecurity and Privacy Editor

Senior editor and content strategist. Writing about technology, design, and the future of digital media. Follow along for deep dives into the industry's moving parts.