Referrer-Policy controls how much referrer information customer portal links send; check sensitive addresses and outgoing requests before choosing a value.
Key takeaways
- Check links for customer details and sign-in codes.
- Identify the sending page and the portal's outgoing requests.
- Use no-referrer for sensitive addresses.
- Confirm the response header and test outside widgets after changing it.
The browser passes referrer information along in a request header called Referer, and Referrer-Policy controls how much is sent. For most links that is harmless. But the full address can carry things you would rather keep private: an account number, a survey response key, a support ticket ID, or a one-time sign-in code. Once the customer is on the portal, any outside script, image or embedded form that the portal loads can also see the portal's address.
MDN describes the header as one that controls how much referrer information (sent with the Referer header) should be included with requests. This post gives you a decision path rather than a list to memorize. Check the link first, then check which page sends the request, and only then pick one of the four values covered here. It is written for the CS manager or ops lead who owns the links and needs to agree the setting with whoever runs the website. You will not need to write any code yourself, but you will need to ask the people who do the work the right questions about the setting.
Check what your links carry first
Before you change anything, open three or four of your real links and read them in full, including everything after the question mark. A link to an onboarding step might look like a site address, a path that names the step, and a long string of letters and numbers after the question mark. That string is often where the trouble sits. For each link, answer three questions.
First, does the address identify the customer or open something? Look for account IDs, email addresses, survey keys and sign-in codes. If the answer is yes, the address is sensitive, and you should limit what leaves it.
Second, does the landing page load anything from another company? Survey embeds, chat widgets, video players, analytics tags and font hosts are common examples. If the answer is yes, that page makes requests of its own, and its policy decides what those companies receive.
Third, does the landing page link out to another site? A help article on a different domain or a "book a call" button counts. A click on one of those links also sends a referrer, so the same question applies.
Mark each link as sensitive, outside-facing, or both. You will use those marks in the steps below. You do not need to audit every page on the site on day one. Start with the links that customers click most often and that carry the most personal detail.
There is one more case to check. In MDN's words, the browser's default policy applies if no policy is specified, or if the provided value is invalid. That means a typo in the header can leave you with a setting that nobody chose. After you make a change, check the response to confirm that the value you wrote is the value the server actually sends.
Find which page sends the referrer
Two pages can matter, and teams often fix only the one they can see.
The first is the page that holds the link. This might be your help desk tool, your billing system, or your own marketing site, wherever the customer clicked. Its policy decides how much of its address the portal receives when the click happens. The change can go on the sending page or on the portal server, depending on where the header is configured, so you may need a different team to make it. If your help desk tool is a hosted product, check whether its settings let you choose the policy, and if they do not, ask the vendor what it sends by default.
The second is the portal page the customer lands on. Its policy decides what its own outgoing requests carry: images, scripts, embedded survey forms and any links it shows. This is the setting to focus on if you flagged the page as outside-facing. A portal can be perfectly safe on the sign-in page and still leak through a help widget loaded further down.
Ask your developer or hosting provider which of these pages set the header today. Many setups put the header on the web server or the content delivery network, so one change can cover every page under a domain. Find out which of these you have before you plan the change, because a setting in one place can be overridden by a setting in another.
When you brief your developer, send them the list of links you marked in the first section, the sending tools involved and any outside vendors on the landing pages. Ask three things: which page sets the header today, which value it currently uses, and whether a change can be made without touching the sign-in flow. A short written request like that saves a round of back-and-forth.
Survey and onboarding links need their own check
Survey and onboarding links are where the referrer question usually gets messy. A survey tool often hosts the form on its own domain. When a customer clicks through from your portal to that form, the portal's policy controls what referrer information goes to the survey vendor. If the policy sends an address containing the customer's account ID, the vendor receives that ID, whether or not you intended that disclosure.
Onboarding links have a different pattern. They often send the customer through a sign-in step and back again, so the link may carry a return address or a single-use, time-limited code. Both of these cases are worth a close look, because the link can carry more detail than the customer or the team realizes.
For survey links, a practical question to ask is whether the vendor needs the customer's ID at all. Often it does not. A response key still counts as a sensitive survey key unless it cannot be traced back to the customer, so treat the link as sensitive and keep the no-referrer treatment. If the ID can be removed, remove it. If it cannot, the link is sensitive, and the sections below apply in full. Include this check in your survey configuration review.
For onboarding links, the question is what the link does after the customer arrives. If it passes a code, a return address or a session value, treat that link as sensitive, and read the sections on the state parameter and on the no-referrer value before you decide.
If the link carries a secret, use no-referrer
Use this value when the link itself is sensitive. Typical cases include a sign-in or password-reset link, a survey link tied to one named customer, and an onboarding link that holds a code. MDN's description is direct: the Referer header will be omitted: sent requests do not include any referrer information.
The cost is that the portal loses referrer data; check how your analytics handles visits without it. That is usually acceptable for secret links, because you should not be measuring them through referrers anyway. If you still want to know which email campaign drove a visit, put a plain campaign label in the link. A label such as a campaign code carries nothing that identifies the customer, so it can stay in the address without creating a new problem.
The better fix is often to remove the secret from the address altogether. If a link starts a sign-in with a third-party account, such as Google, the flow redirects the customer to the provider, and the app then handles the returned authorization code. Google's OAuth guide describes setting parameters, redirecting the user for consent, handling the response and exchanging the authorization code. Your developer should confirm that the code is handled inside the app and is not left sitting in the address bar, the browser history or a referrer. A referrer policy limits the damage, but the cleaner fix is a link that carries no code at all. Review related password reset link rules when checking support links.
If the page only loads its own files, use same-origin
Use same-origin when the landing page has no outside scripts, embeds or links, and when the address carries nothing you need to hide from outside companies. Check what your own analytics receives after the change.
Check the widget case first. If the portal loads a survey tool or a chat widget, test it after the change. Confirm that the widget still works with the chosen policy. Test from a real link, once from a logged-out browser and once from a logged-in one, and confirm that the widget appears and works in both.
Audit the page before choosing this value, including its outside content and links. It is also a good fit for internal pages that customers reach only after signing in, since those pages rarely need to send a full address to anyone else.
Check strict-origin-when-cross-origin for outside content
Consider this value when reviewing portals that load a survey embed, a chat widget or a help link to another domain. Ask your developer to check what referrer information each destination receives. Confirm that your reporting still gives you the information you need.
Review this value when your landing page has outside-facing content, but the link itself is not secret. A link that carries only a campaign label or a page name usually falls into this group. Base the choice on the outgoing requests you test.
Test the outside pieces after the change. Load the survey embed, click the help link and check that the destination opens as expected. If a widget stops working, ask your developer to investigate that piece before changing the value for the whole page.
Before you choose, decide what reporting you need. If your marketing team relies on referrer data to judge campaign results, make sure the value you pick still shows the sending site for ordinary pages. A setting that protects the address but blinds the reports can create a new argument inside the team, so settle that question first.
If secure destinations need the full address, assess no-referrer-when-downgrade
This value is one of the more permissive of the four for a customer portal, and it needs a careful check before you pick it. MDN describes its rule in two parts. First, send the origin, path, and query string in Referer when the protocol security level stays the same or improves. That covers requests from HTTP to HTTP, from HTTP to HTTPS and from HTTPS to HTTPS. Second, don't send the Referer header for requests to less secure destinations, which covers requests from HTTPS to HTTP.
For a portal whose links hold customer data, that is usually the wrong direction. The address you most want to protect is exactly the part this value passes along.
The only case where this value fits is when an outside destination needs the full address for a real reason, and when your check in the first section found no sensitive parts in the URL. If either condition fails, pick one of the stricter values above. Make the choice on the strength of the link, not on the fact that the setting is available.
Return addresses and the state parameter
Some onboarding links carry a return address, so the customer lands back on the right page after a step. Often that address sits in a parameter the portal reads and then uses to redirect the customer. Microsoft's identity guidance covers this pattern in its redirect URI documentation. It says: "When using a state parameter, guard against CSRF protection as specified in section 10.12 of RFC 6749." It also warns about what happens when the parameter can be changed: "This approach allows a compromised client to modify the additional parameters sent in the state parameter, thereby redirecting the user to a different URL, which is the open redirector threat described in RFC 6819."
That guidance is written for sign-in applications, but the idea carries over to onboarding links. A return address in a parameter can be changed by whoever edits the link, and a portal that redirects to whatever address it finds can send a customer to a page you never meant them to visit. You do not need to understand the protocol details to act on this. You need to ask two questions. Does the link carry a return address in a parameter? And does the portal check that address before it redirects the customer?
If the answer to either question is unclear, treat it as a security question and send it to your security contact or your developer, not as a copywriting fix. A referrer policy will not stop a redirect that the portal itself allows.
Roll out and verify
Once you have made the choice, roll it out one link type at a time, so that a problem in one place does not hide a problem in another. A reasonable order is:
- Pick one link type, such as portal sign-in, survey invitations or onboarding. Use the sensitive and outside-facing marks from the first section.
- Set the value on the sending page or on the portal server, whichever you identified earlier.
- Open a real link from each sending tool and check where it lands. Do this from a logged-in browser and from a logged-out one.
- Open the browser's developer tools on the page you changed in step 2 — the sending page if the value was set there, or the portal server if it was set there — look at the response headers, and confirm that the Referrer-Policy value is the one you chose; a landing-page check alone will not confirm a value set on the sending page.
- Test every outside widget on the page, such as a survey embed or a chat tool. Confirm that it loads and works.
- Watch your analytics over a normal reporting cycle. Check how visits from secret links are classified before treating a reporting change as a fault.
- Write down which value each link type uses and who owns the setting. That way the next website change does not undo it without anyone noticing.
Keep the list short. A team that can explain the value for each of its main link types will avoid most of the surprises that come from a header change. A team that cannot explain them will eventually find out the hard way, usually when a survey vendor or an outside widget reports a problem.
Finally, return to the first question and ask it again every time a new link type appears. A new survey tool, a new onboarding step or a new help widget can change what the link carries, even when the page looks the same. The order matters more than the value you pick. For many teams, that means one value for secret links and a different value for ordinary pages.
Illustrative example: checking a survey link
An illustrative review finds 10 survey links, with customer IDs in 5 addresses. Remove those IDs where possible. For addresses that remain sensitive, ask the developer to apply no-referrer on the page sending the request, then test the survey and check its response header.
Your next step today
Open a customer link, mark whether it is sensitive or outside-facing, and send its owner the three link questions from the section on what your links carry.
Questions
Where should the policy change happen?
Change the policy on the page sending the request. That may be the page holding the portal link or the portal making outgoing requests.
Does the header confirm that widgets work?
No, checking the header confirms the setting, while testing each widget confirms its behavior.
Sources
Limits of this post
This post is general operational information, not legal advice about notice periods or renewal clauses. It does not promise that any method keeps a customer. Software can get a fact wrong, so open the sources before you act.