Loading

Salesforce Sites and Experience Cloud: Users Redirected to 'Authorization Required' or 'File Not Found' Page

Udgivelsesdato: May 22, 2026
Beskrivelse

When an external or guest user navigates to an invalid URL on a Salesforce Site (previously known as Force.com Sites) or an Experience Cloud Community, Salesforce redirects the user based on the site's login configuration:

 

  • If the requested URL contains a file extension (e.g., /randomName.html) and login is enabled, the user is redirected to the Authorization Required page (HTTP 401).
  • If the requested URL contains a file extension and login is not enabled, the user is redirected to the Page Not Found page (HTTP 404).
  • If the user requests an invalid page path without a file extension (e.g., /randomName, where randomName does not match any existing Visualforce page or Lightning Community path), Salesforce always redirects to the Page Not Found page (HTTP 404).

This behavior is working as designed.

Løsning

Affected User Types and Site Types

This behavior applies to guest users of Salesforce Sites (previously known as Force.com Sites) and Communities, including Experience Cloud sites.

Authorization Required Page (401) for Resource Errors

A redirect to the Authorization Required page (HTTP 401) may also occur when there are errors processing a valid resource request (such as /MyVisualforcePage), not just invalid URLs. In this case, enable debug logs for the Site Guest User and troubleshoot as you would for any Apex or page rendering error. If the issue cannot be resolved, contact Salesforce Support for assistance.

Summary of Redirect Behavior

Request TypeLogin EnabledRedirect Target
Invalid resource with file extension (e.g., /page.html)YesAuthorization Required (401)
Invalid resource with file extension (e.g., /page.html)NoPage Not Found (404)
Invalid page path without extension (e.g., /randomPage)EitherPage Not Found (404)
Valid resource with processing errorYesAuthorization Required (401)

 

Vidensartikelnummer

000384636

 
Indlæser
Salesforce Help | Article