Security & SEO

    Content-Security-Policy header check

    Parses your CSP and flags unsafe-inline, unsafe-eval, wildcard sources, and missing directives — the hardest security header to get right.

    Updated 2026-07-10
    1 min read
    csp
    security-headers
    xss

    Quick answer#

    Lemwatch parses every CSP directive and grades it against Mozilla's Observatory ruleset.

    What it checks#

  1. Presence of default-src / script-src
  2. Use of unsafe-inline, unsafe-eval (penalised)
  3. Wildcard sources like * or https: (penalised)
  4. report-uri / report-to for violations
  5. frame-ancestors (replaces X-Frame-Options for modern browsers)
  6. Where to find it in Lemwatch#

    Site details → Security → Headers → CSP.

    How to fix#

  7. Start in report-only mode: Content-Security-Policy-Report-Only: ....
  8. Watch reports for 2 weeks, whitelist real sources.
  9. Replace unsafe-inline with nonces or hashes.
  10. Move to enforcing mode.
  11. Re-run the check.
  12. FAQ#

    Why not just copy a "strict CSP" from a template?#

    Every site loads different third parties — a copy-paste CSP usually breaks analytics or fonts.

    Does CSP block third-party ads?#

    Only the sources you don't whitelist.

  13. Security headers
  14. HSTS header check
  15. X-Frame-Options check
  16. Was this article helpful?