You are here:
Switch Between Your Salesforce Org and Your Experience Cloud Sites
If you use Experience Builder sites and Lightning Experience, use the App Launcher to switch back and forth between your Salesforce org and your Experience Cloud sites associated with it. If you use Tabs + Visualforce sites and Salesforce Classic, use the global header. You can embed a site URL directly into buttons or links. You can also redirect a user to another site or to a specific page within another site.
Required Editions
| Available in: Salesforce Classic and Lightning Experience |
| Available in: Enterprise, Performance, Unlimited, and Developer Editions |
| Applies to: LWR, Aura, and Visualforce sites |
Switching between your Salesforce org and your sites doesn’t disrupt your workflow. You’re returned to the page that you were working on, either in the current browser tab (standard apps) or in a new browser tab (connected apps and communities). If you’re using the App Launcher or the global header, whichever sites you’re a member of are displayed as a dropdown or tile.
App Launcher for Experience Builder Sites and Lightning Experience
The App Launcher is available to some users on Experience Builder templates.
In Lightning Experience, the full view of the App Launcher displays a tile for every published site along with your apps. In Experience Builder sites, the App Launcher displays a tile for every published site and app but the All Items area and AppExchange link aren’t available. Members see only the sites and apps that they’re authorized to see according to their profile or permission sets.
Global Header for Tabs + Visualforce Sites and Salesforce Classic
From the menu on the left side, you can switch between sites and your Salesforce org.
- The dropdown shows all active sites associated with your org that you’re a member of.
- If you have the “Create and Set Up Experiences” permission, you also see previews of sites that you’re a member of.
- Internal users who aren’t members of any sites only see the company name.
- External users see the dropdown menu only if they belong to more than one active site.
- External users who are members of only one active site don’t see the dropdown menu in the site.
The Your Name menu on the right side contains links to edit contact information and log out. Internal users can also access Salesforce Help and links to Setup and other tools depending on user permissions and enabled features.
Embedded Site URLs
To allow users to switch between a Salesforce org and a site served on that org without requiring the user to log in again, you can embed site URLs into buttons or links. This method can also bring the user to another site served by the same org. To determine the embedded URL to use, follow these guidelines.
To link to a page of a site that’s publicly shared with guest users, use the fully qualified URL. For example, https://example.my.site.com or https://example.my.site.com/store, where siteID is the 15-digit site ID, which can be found in the Experience Builder URL for that site.
To create an embedded URL to switch to the landing page of a site that requires login, add
this string to your Salesforce org URL:
/servlet/networks/switch?networkId=siteId.
To link to a specific page on a site that requires user login, add
/servlet/networks/switch?networkId=siteId&startURL=pageSubpath
to your Salesforce org URL, where siteID is the 15-digit site ID and
pageSubpath is the subpath for the site page. The site subpath varies
based on the site
type. In all cases, the base URL of the site is the URL listed in All Sites in
Setup, which is either the URL up to the first slash or the URL up to the site name.
- For LWR and Enhanced LWR site pages, the pageSubpath is the string after the base URL. For example, if the base URL of the site is https://example.my.site.com, to switch to https://example.my.site.com/jobs, the pageSubpath is jobs. Or if the base URL for the site is https://example.my.site.com/store, to switch to https://example.my.site.com/store/cart, the pageSubpath is cart.
- For Aura site pages, the pageSubpath is the string that starts with s/. For example, s/shopping/cart in https://example.my.site.com/store/s/shopping/cart.
- For Visualforce sites, the pageSubpath is the string after the base
path for the site. If /s/ is in the URL, start the
pageSubpath with the s character.
- For example, if https://example.my.site.com/shop is the base path for the site, to switch to https://example.my.site.com/shop/s/store/cart, the pageSubpath is s/store/cart.
- For example, if https://example.my.site.com/shop/store is the base path for the site, to switch to https://example.my.site.com/shop/store/cart, the pageSubpath is cart.
Here’s another example. In an org with the URL https://example.my.lightning.com, we want to provide options for that user to switch from that org to the landing page and to the shopping cart of an LWR site with the network ID 3X0000000000012. The site requires user login, and the base URL is https://example.my.site.com/store and the shopping cart URL is https://example.my.site.com/store/cart.
To provide the option to switch to the site’s landing page, use this embedded URL: https://example.my.lightning.com/servlet/networks/switch?networkId=3X0000000000012.
And to provide the option to switch to the shopping cart, use this embedded URL: https://example.my.lightning.com/servlet/networks/switch?networkId=3X0000000000012&startURL=cart.
Also, if you use the startURL parameter to point to a default landing page, unexpected behavior can occur.

