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 defaultreport-uri holds the address itself. report-to holds a name, and Reporting-Endpoints says which address that name means.
How they differ
| Property | report-uri | report-to |
|---|---|---|
| Status | Deprecated, still widely supported | Current |
| Value | One or more URLs | One endpoint name |
| Content type | application/csp-report | application/reports+json |
| Body | One report | A list, which can mix report types |
| Field names | blocked-uri | blockedURL |
| Sent | Straight away | In batches, so it can take a minute or more |
| HTTPS | Not required | Required |
| Other reports | CSP only | The same endpoint can take deprecations, crashes, COOP, COEP and more |
Browser support
| Feature | Chrome | Firefox | Safari |
|---|---|---|---|
| report-uri | 25 | 23 | 7 |
| report-to | 70 | 149 | 16.4 |
| Reporting-Endpoints | 96 | 130 | 16.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 cspneedsReporting-Endpoints: csp="…". If it does not match, browsers that supportreport-tosend nothing, because they ignorereport-urias 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
POSTwith aContent-Typeheader. - 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-Endpointsreplaces it for CSP. Network Error Logging still uses it.
Last checked 24 November 2026.