When navigating from an aura component to a VF Page I get the following error, and I can't figure out why. Note, in the retURL, the component is lightning:urlAddressable

Error: We can't display this page because your browser blocks cross-domain cookies. Try again with a different supported browser.

let pageRef = {
    "type": "standard__webPage",
    "attributes": {
        "url": "/apex/ns__VFPage?ns__acctId=a063m00000slJPoAAM&retURL=%2Flightning%2Fcmp%2Fns__LexCmp%3Fns__acctId%3Da063m00000slJPoAAM%26ns__executeSearch%3Dtrue"

//<lightning:navigation aura:id="navService" />

Relevant post:

Does <lightning:navigation> support targeting Visualforce pages with URL parameters?

1 Answer 1


This is due to browser settings. Salesforce are aware of this issue, caused by the fact that Lightning and Classic (including Visualforce pages) URLs actually relate to different domains and that in LEX any Visualforce pages are embedded via iframes in the Lightning page. Most modern browsers now require "same site" cookie origin to allow cookies to be shared across the iframe boundary.

The "fix" can probably already be enabled on your org using the "Enhanced Domains" feature. As the documentation says:

This functionality is available on a rolling basis starting in the Spring ’21 release and is available to all customers by April 30, 2021

Consistent domain formats improve the user experience and reduce errors in code and API calls. Salesforce enhanced domains also comply with the latest browser requirements, allowing your users to access Salesforce using browsers that block third-party cookies.

When you deploy a My Domain with enhanced domains, all application URLs start with the org’s My Domain name and instance names are removed. Package names are removed from some URLs. The domain suffix (the part after the My Domain name) changes for Experience Cloud sites, Salesforce Sites, content files, Site.com Studio, Experience Builder, and Visualforce URLs. And Sandbox org URLs include the word sandbox, making them easy to identify.

And as per an App Exchange Tech Talk from last week:

Why? Comply with latest browser requirements to access Salesforce using browsers that block third-party cookies

  • Thanks for getting back to me @Phil W. What is their recommendation for ISVs? subscriber's orgs might not have that setting enabled (or might give resistance in enabling that setting) - or who should I tweet to ask that question? Apr 28, 2021 at 11:47
  • I work for an ISV. As a business, if you are having this sort of issue with your package(s) it's up to you to notify your subscribers that the solution is to turn on this setting. Note that it will be auto-enabled from Summer '21 if I recall what was said in the tech talk correctly.
    – Phil W
    Apr 28, 2021 at 12:00
  • It's really strange Phil. The Navigation is working today (no changes to the code), and yesterday I was getting the error above. It's been intermittent the last few days.... Thanks for the heads up on the domain formats Apr 28, 2021 at 15:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.