Guides

CSP report-uri vs report-to

Send both. Browsers that support report-to ignore report-uri, and older ones only understand report-uri, so you will not get the same report twice.

Headers to copy

Reporting-Endpoints: default="https://YOUR-ID.cspinbox.com/r"
Content-Security-Policy: default-src 'self';
  report-uri https://YOUR-ID.cspinbox.com/csp; report-to default

report-uri holds the address itself. report-to holds a name, and Reporting-Endpoints says which address that name means.

How they differ

Propertyreport-urireport-to
StatusDeprecated, still widely supportedCurrent
ValueOne or more URLsOne endpoint name
Content typeapplication/csp-reportapplication/reports+json
BodyOne reportA list, which can mix report types
Field namesblocked-uriblockedURL
SentStraight awayIn batches, so it can take a minute or more
HTTPSNot requiredRequired
Other reportsCSP onlyThe same endpoint can take deprecations, crashes, COOP, COEP and more

Browser support

FeatureChromeFirefoxSafari
report-uri25237
report-to7014916.4
Reporting-Endpoints9613016.4

First version with support, from MDN's compatibility data. Firefox came to report-to late, which is the main reason to keep report-uri for now.

What each report looks like

From report-uri:

{
  "csp-report": {
    "document-uri": "https://shop.example/checkout",
    "effective-directive": "script-src-elem",
    "blocked-uri": "https://cdn.example/a.js",
    "disposition": "enforce",
    "original-policy": "default-src 'self'; report-uri …",
    "status-code": 200
  }
}

From report-to:

[
  {
    "type": "csp-violation",
    "age": 420,
    "url": "https://shop.example/checkout",
    "user_agent": "Mozilla/5.0 …",
    "body": {
      "documentURL": "https://shop.example/checkout",
      "effectiveDirective": "script-src-elem",
      "blockedURL": "https://cdn.example/a.js",
      "disposition": "enforce",
      "originalPolicy": "default-src 'self'; report-to …",
      "statusCode": 200
    }
  }
]

Mistakes that lose reports

  • The names do not match. report-to csp needs Reporting-Endpoints: csp="…". If it does not match, browsers that support report-to send nothing, because they ignore report-uri as well.
  • Reporting-Endpoints is missing from some pages. It applies to the response it arrives with, so send it with every page that has a policy.
  • The endpoint does not answer CORS preflights. If it is on another origin, it has to allow POST with a Content-Type header.
  • The endpoint is plain HTTP. Browsers ignore it, which can catch you out when testing locally.
  • The policy is in a meta tag. Neither directive works there.
  • Only the old Report-To header is set. It is the JSON one, and Reporting-Endpoints replaces it for CSP. Network Error Logging still uses it.

Last checked 24 November 2026.

Read next