Website Security Q&As Logo
Website Security Q&As Part of the Q&A Network
Q&A Logo

How do I prevent sensitive data from leaking via referrers?

Asked on Oct 09, 2025

Answer

To prevent sensitive data from leaking via referrers, you can use the "Referrer-Policy" HTTP header to control the amount of referrer information shared.
<!-- BEGIN COPY / PASTE -->
    Referrer-Policy: no-referrer
    <!-- END COPY / PASTE -->
Additional Comment:
  • The "no-referrer" policy ensures that no referrer information is sent with requests, providing maximum privacy.
  • Other policies like "same-origin" or "strict-origin" can be used for more granular control, balancing privacy with functionality.
  • Implementing this header helps protect against leaking sensitive URL parameters or paths to third-party sites.

✅ Answered with Security best practices.


← Back to All Questions
The Q&A Network