Salesforce Sites URL Redirects
If you move or reorganize pages on your Salesforce Site, search engines can have trouble finding the new page locations. To avoid this issue, set up site URL redirects to inform users and search engines that site content has moved.
Required Editions
| Available in: both Salesforce Classic and Lightning Experience |
| Available in: Developer, Enterprise, Performance, and Unlimited Editions |
| User Permissions Needed | |
|---|---|
| To create and edit site URL redirects: | Customize Application |
| To view site URL redirects: | View Setup and Configuration |
Consider the following while implementing site URL redirects:
- You can't redirect error pages or CSS files (files with a .css extension).
- You can have a maximum of 6,000 redirect rules across all sites.
- Query parameters in site URL redirects are matched exactly. However, you can't
redirect any URLs that include the
lastModparameter. - If you have URL rewriting enabled on your site, it runs after any site page redirects.
- To redirect an Experience Cloud site home page to its companion Site.com home page set the Source URL to /. That path represents the home page for the Experience Cloud site. Then set the Target URL to s, which represents the home page for the Site.com site.
To assign a redirect to a site page:
- From Setup, in the Quick Find box, enter Sites, and then select Sites.
- Click a site label.
- On the site detail page, click URL Redirects.
-
For Source URL, specify the former page location.
The source URL must be a relative URL, and it
- It must be a relative URL.
- It can’t contain anchors, such as #target in /siteprefix/page.html#target.
- It can have any valid extension type, such as .html or .php.
Note If you use sites with prefixes, manually add the prefix to the Source URL and Target URL fields. Also, if you have a root-level site and one with a prefix, and you want to redirect a page in your prefixed site, include the prefix in the redirect rule. Otherwise, Salesforce looks for the rule in your root site, resulting in a 404 error. -
Specify the Redirect Type.
- Permanent (301)—Select this option when you want users and search engines to update the URL in their systems when visiting the page. Users visiting a page with this redirect type are sent to the new page. With this option, that your URLs retain their search engine popularity ratings. It also instructs search engines to index the new page and to remove the obsolete source URL from their indexes.
- Temporary (302)—Select this option when you want users and search engines to keep using the original URL for the page. Search engines interpret a 302 redirect as one that could change again at any time. Although search engines index and serve the content on the new target page, they also keep the source URL in their indexes.
-
In the Target URL field, specify the new page location.
The target URL can be a relative URL or a fully qualified URL with an https:// prefix. Unlike source URLs, target URLs can contain anchors.
- Save your changes.
The Redirect Rules section displays all URL redirect rules you've created for your site. In this section you can:
- Edit an assigned redirect rule.
- Activate or deactivate a redirect rule.
- Delete a redirect rule.
- Sort the list in ascending or descending order by clicking the corresponding column heading.
See Also
Did this article solve your issue?
Let us know so we can improve!

