Content-Security-Policy (CSP) header
The list of sources a page may load scripts, styles and frames from. It is the one header that limits what an injected script can do — unless its script sources allow unsafe-inline, which hands that back.
Content-Security-Policy (CSP) lists the sources a page is allowed to load scripts, styles, images, frames and other resources from. If an attacker finds a way to inject HTML, the browser still refuses to run scripts that the policy does not allow. It is the one header that directly limits the damage of cross-site scripting (XSS).
How SiteScan grades it
- “Strong”: an enforced policy whose script sources do not allow
'unsafe-inline'or'unsafe-eval'. Nonces and hashes are fine. - “Weak”: the policy allows inline scripts or eval, or it is only
Content-Security-Policy-Report-Only, which logs violations but blocks nothing. - “Missing”: no policy at all.
Separate findings point out a policy without default-src, object-src, base-uri or frame-ancestors, and a * source for scripts. Inline styles are reported but do not lower the grade.
How to start
A solid base: default-src 'self'; object-src 'none'; base-uri 'self'; frame-ancestors 'self', then add the external hosts your pages really use. Deploy it first as Report-Only, watch the reports for a week, then switch to the enforcing header. Replace inline <script> blocks with files or add nonces. More in the guide to security headers.
See this check on your own site
Run a free scan: the report shows this row for your domain along with the other checks of the site audit.
More in “Security headers”
What SiteScan checks
TLS certificate
- TLS certificate expiry
- Outdated TLS versions (TLS 1.0/1.1)
- TLS certificate chain
- TLS certificate issuer
- Certificate signature algorithm
Domain registration
- Domain registration expiry
- Registered domain name
- Domain registrar
- Domain registration date
- Domain last updated date
- Domain status codes (EPP)
- Domain transfer lock
- Registrar abuse contact
- RDAP and WHOIS data source
Indexing
- robots.txt file
- CSS and JS blocked in robots.txt
- XML sitemap
- Sitemap index file
- Off-domain URLs in the sitemap
- Sitemap lastmod dates
- Broken URLs in the sitemap
- RSS and Atom feed
Addresses & redirects
Security headers
- HTTP security headers and grade
- Strict-Transport-Security (HSTS) header
- Content-Security-Policy (CSP) header
- X-Content-Type-Options: nosniff
- X-Frame-Options and clickjacking
- Referrer-Policy header
- Permissions-Policy header
- HSTS preload list
- CORS and cross-origin reads
- HTTP TRACE method
Delivery & reputation
- Cache-Control header for HTML
- ETag and Last-Modified revalidation
- HTTP/3 and QUIC support
- Server version disclosure in headers
- DNS blocklist (DNSBL) check
Internal links
Exposure
- Exposed sensitive files (.env, .git, backups)
- Directory listing enabled
- Public JavaScript source maps
- Exposed WordPress endpoints
Well-known files
- security.txt file
- llms.txt for AI assistants
- llms-full.txt file
- ads.txt authorized sellers file
- humans.txt file
- Well-known change-password URL
DNS & email
- MX records (mail servers)
- SPF record
- DMARC record and policy
- DNSSEC signing
- CAA record
- Nameserver redundancy
- IPv6 support (AAAA record)
- MTA-STS policy
- TLS-RPT reporting record
- BIMI record (brand logo in email)
- Wildcard DNS record
- Dangling CNAME and subdomain takeover
Privacy & consent
- Analytics and tracking scripts
- Cookie consent banner
- Privacy policy link
- Terms of service link
- Imprint (Impressum)
- Accessibility statement
Core Web Vitals
- Lighthouse performance score
- Largest Contentful Paint (LCP)
- Cumulative Layout Shift (CLS)
- Interaction to Next Paint (INP)
- CrUX field data vs lab data