Loading

Salesforce Login History Error: Restricted Domain

Дата публикации: Jul 16, 2026
Описание

If a user is failing to log in to Salesforce and their login history shows the error 'Restricted Domain,' they are likely attempting to access Salesforce via a saved bookmark or are not logging in from the correct domain URL.

If you are an administrator, check your org's domain restriction settings by navigating to My Domain in Setup:

  • Salesforce Classic: Setup | Domain Management | My Domain
  • Lightning Experience: Click the gear icon | Setup | Company Settings | My Domain

If "Prevent login from https://login.salesforce.com" is enabled, all users in the environment will need to use your Salesforce instance's unique MyDomain URL to log in.

Users logging in to a Sandbox directly through Production (via Setup | Sandboxes) can encounter this same issue if "Prevent login from https://test.salesforce.com" is enabled. Logging in from Production to a Sandbox will route the user to the respective Sandbox's default URL (https://<instance>.salesforce.com) instead of the Sandbox's domain.

Решение

This article explains why Salesforce users encounter a 'Restricted Domain' error in login history and how administrators can resolve it by directing users to the correct MyDomain URL.

Causes

This error usually occurs when both of the following conditions are true:

  • The Organization Administrator has enabled My Domain with the following configurations:
    • "Prevent login from https://login.salesforce.com" or "Prevent login from https://test.salesforce.com" is ON
    • The Redirect Policy is set to "Not redirected (Recommended)"
  • Users are trying to log in from one of the following URLs:
    • A generic Salesforce login page, such as https://login.salesforce.com or https://test.salesforce.com
    • An incorrect MyDomain URL (such as an old MyDomain or a misspelled link)

Resolution

Have users log in using your Salesforce instance's unique MyDomain URL instead of the generic Salesforce login pages. Make sure to also update any user web browser bookmarks to reflect your instance's MyDomain URL.

For a full list of the URLs used to access Salesforce and their My Domain URL formats, see My Domain URL Formats in Salesforce Help.

Номер статьи базы знаний

000387792

 
Загрузка
Salesforce Help | Article