Referrer-Policy Auditor avatar

Referrer-Policy Auditor

Pricing

Pay per usage

Go to Apify Store
Referrer-Policy Auditor

Referrer-Policy Auditor

Fetch one public URL and deeply audit its Referrer-Policy HTTP header and meta referrer tag. Validates directives, detects deprecated values, flags conflicts, and returns a privacy posture score, grade, issues, and recommendations.

Pricing

Pay per usage

Rating

0.0

(0)

Developer

Sanskar Jaiswal

Sanskar Jaiswal

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Share

Fetches one public URL and deeply audits its Referrer-Policy HTTP response header and HTML <meta name="referrer"> tag. Validates policy directives against the Referrer Policy spec, detects privacy-leaking and deprecated values, flags conflicting multiple headers, evaluates effective policy precedence (HTTP header over meta tag), and returns a privacy posture readiness score, letter grade, issues, and recommendations. Built for security teams, devops engineers, privacy/compliance auditors, frontend platform teams, and site migration QA workflows.

Use cases

  • Verify that a Referrer-Policy header is set after a deploy or CDN cutover to prevent referrer URL leakage to third parties.
  • Detect privacy-leaking directives such as unsafe-url or no-referrer-when-downgrade that send full URLs in Referer headers.
  • Identify invalid directives that browsers silently ignore, leaving the page with no explicit policy.
  • Check whether a <meta name="referrer"> tag is used as a fallback and whether it conflicts with the HTTP header.
  • Flag conflicting multiple Referrer-Policy header values where the last valid directive wins per spec.
  • Evaluate the effective policy (header takes precedence over meta) and classify privacy posture as strong, balanced, weak, or none.
  • Run scheduled checks on domains to catch referrer policy drift after deploys, CDN changes, and framework updates.
  • Feed structured results into security dashboards or CI pipelines.

Input

FieldTypeDescription
startUrlstringPublic HTTP or HTTPS URL to audit. The actor fetches this page and inspects the Referrer-Policy response header and <meta name="referrer"> tag. URLs with credentials and private network targets are rejected.
timeoutSecondsintegerRequest timeout from 3 to 30 seconds. Defaults to 10.

Output

The actor pushes one dataset item per run.

FieldTypeDescription
inputUrlstringOriginal URL from input.
normalizedInputUrlstringNormalized input URL after defaulting the scheme.
finalUrlstringFinal URL after redirects.
httpsbooleanTrue when the page was served over HTTPS.
okbooleanTrue when the fetch succeeded.
checkedAtstringISO timestamp for the audit.
httpStatusinteger or nullHTTP status code from the response.
hasHeaderbooleanTrue when a Referrer-Policy response header is present.
headerValuesarrayRaw Referrer-Policy header value(s).
headerValueCountintegerNumber of Referrer-Policy header values.
parsedPoliciesarrayValid policy directives parsed from the header.
hasInvalidHeaderDirectivebooleanTrue when the header contains unrecognized directives.
hasDeprecatedHeaderDirectivebooleanTrue when the header uses a privacy-leaking directive.
hasConflictingHeadersbooleanTrue when multiple valid directives are present in the header.
hasMetaReferrerbooleanTrue when a <meta name="referrer"> tag is present in the HTML.
metaReferrerValuesarrayContent values from meta referrer tags.
metaReferrerCountintegerNumber of meta referrer tags found.
hasInvalidMetaDirectivebooleanTrue when the meta tag contains an unrecognized directive.
hasDeprecatedMetaDirectivebooleanTrue when the meta tag uses a privacy-leaking directive.
effectivePolicystring or nullThe effective policy after header-over-meta precedence.
effectivePolicySourcestring or nullWhere the effective policy comes from: header or meta.
privacyPosturestring or nullPrivacy classification: strong, balanced, weak, or none.
specCompliantbooleanTrue when the effective policy is a valid spec directive.
scoreintegerPrivacy posture readiness score from 0 to 100.
gradestringLetter grade from A+ to F.
issuesarrayHuman-readable issues.
recommendationsarraySuggested fixes.
errorstring or nullFetch-level error, if the request failed.

Example input

{
"startUrl": "https://example.com/",
"timeoutSeconds": 10
}

Example output

{
"inputUrl": "https://example.com/",
"normalizedInputUrl": "https://example.com/",
"finalUrl": "https://example.com/",
"https": true,
"ok": true,
"checkedAt": "2025-01-01T00:00:00.000Z",
"httpStatus": 200,
"hasHeader": true,
"headerValues": ["strict-origin-when-cross-origin"],
"headerValueCount": 1,
"parsedPolicies": ["strict-origin-when-cross-origin"],
"hasInvalidHeaderDirective": false,
"hasDeprecatedHeaderDirective": false,
"hasConflictingHeaders": false,
"hasMetaReferrer": false,
"metaReferrerValues": [],
"metaReferrerCount": 0,
"hasInvalidMetaDirective": false,
"hasDeprecatedMetaDirective": false,
"effectivePolicy": "strict-origin-when-cross-origin",
"effectivePolicySource": "header",
"privacyPosture": "strong",
"specCompliant": true,
"score": 100,
"grade": "A+",
"issues": [],
"recommendations": [
"No Referrer-Policy issues detected."
],
"error": null
}

Security

  • Only public HTTP and HTTPS URLs are fetched.
  • URLs with usernames or passwords are rejected.
  • Private IPv4, private IPv6, localhost, link-local, and private DNS resolutions are blocked before fetching.
  • Redirect destinations are revalidated before they are followed.
  • The actor does not require logins, cookies, browser sessions, or credentials.
  • The actor fetches only the provided URL. It does not follow or fetch any URLs referenced in the page.

Pricing

EventSuggested price
Actor start$0.005
URL audited$0.01

Suggested launch price: about $0.015 per audited URL. Teams can schedule the actor for recurring checks on domains after deploys and CDN cutovers.

FAQ

Does this actor crawl multiple URLs or a whole site?

No. It fetches one URL per run and inspects the Referrer-Policy header and meta referrer tag on that page. This keeps runs cheap and predictable for CI and scheduled monitoring.

How does the score work?

The score starts at 100 and is reduced for: no policy at all (score set to 40), meta-only without header (-15), invalid header directives (-15), privacy-leaking header directives (-20), conflicting multiple headers (-10), invalid meta directives (-5), privacy-leaking meta directives (-10), unsafe-url effective policy (-25), no-referrer-when-downgrade effective policy (-15), origin-when-cross-origin effective policy (-10), origin effective policy (-5), conflicting header vs meta values (-10). A bonus of +5 is added when both header and meta are present and consistent. Pages with no policy at all receive at most a D grade.

What are the valid Referrer-Policy directives?

Per the Referrer Policy spec (W3C / fetch standard), the valid directives are: no-referrer, no-referrer-when-downgrade, same-origin, origin, strict-origin, origin-when-cross-origin, strict-origin-when-cross-origin, and unsafe-url. The browser default since 2020 is strict-origin-when-cross-origin.

What is the difference between this actor and the HTTP Security Headers Auditor?

The HTTP Security Headers Auditor checks Referrer-Policy as one of ten headers and reports only presence, absence, or a weak-value warning. This actor deeply validates every directive against the spec, detects invalid and deprecated values, checks the HTML <meta name="referrer"> tag, evaluates header-over-meta precedence, detects conflicting multiple headers and header-vs-meta mismatches, classifies privacy posture, and returns a focused referrer-policy diagnostic with a readiness score and recommendations.

What is the <meta name="referrer"> tag?

The <meta name="referrer" content="..."> tag is an HTML-level fallback for setting the referrer policy when an HTTP Referrer-Policy header is not present. Per spec, if both are set, the HTTP header takes precedence. This actor checks both and flags mismatches.