{"id":10315,"date":"2025-01-24T08:49:15","date_gmt":"2025-01-24T08:49:15","guid":{"rendered":"https:\/\/www.greytrix.com\/blogs\/salesforce\/?p=10315"},"modified":"2025-09-08T06:22:48","modified_gmt":"2025-09-08T06:22:48","slug":"enhancing-salesforce-security-how-to-implement-my-domain-login-restrictions","status":"publish","type":"post","link":"https:\/\/www.greytrix.com\/blogs\/salesforce\/2025\/01\/24\/enhancing-salesforce-security-how-to-implement-my-domain-login-restrictions\/","title":{"rendered":"Enhancing Salesforce Security: How to Implement My Domain Login Restrictions"},"content":{"rendered":"\n<p><strong>This blog encapsulates the functionality of the checkbox and its implications for user logins and security. <\/strong>Enabling &#8220;<strong><em>Prevent login from <\/em><\/strong><a href=\"https:\/\/login.salesforce.com\" target=\"_blank\" rel=\"noreferrer noopener\"><em><strong>https:\/\/login.salesforce.com<\/strong><\/em><\/a><strong>&#8220;<\/strong> ensures all users must use your Salesforce org&#8217;s unique My Domain URL to log in. This enhances security, customizes the login experience, and simplifies API integrations by requiring a consistent, branded URL for access.<\/p>\n\n\n\n<p>Here\u2019s a step-by-step guide to implementing this feature:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Log in to Your Salesforce Org<\/strong> \n<ul class=\"wp-block-list\">\n<li>Open Salesforce and search for &#8220;My Domain&#8221; in Quick Find.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-content\/uploads\/2025\/01\/1.-Prevent-Login-Unchecked.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px; align: center;\" src=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-content\/uploads\/2025\/01\/1.-Prevent-Login-Unchecked.png\" alt=\"Prevent Login Unchecked\"><\/a><\/center><font size=\"2\"><center><i> Prevent Login Unchecked <\/i><\/center><\/font>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Prevent Login Unchecked<\/strong>\n<ul class=\"wp-block-list\">\n<li>If the checkbox is unchecked, log in to your Salesforce org, and you will be redirected to your current domain.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><strong>Note:<\/strong><br>When &#8220;Prevent login from <a href=\"https:\/\/login.salesforce.com\" target=\"_blank\" rel=\"noopener\">https:\/\/login.salesforce.com<\/a>&#8221; is enabled, all users must log in through your unique My Domain URL.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Redirect Salesforce Org<\/strong>\n<ul class=\"wp-block-list\">\n<li>To enforce this restriction, enable the \u201cPrevent Login from\u201d checkbox and save the settings.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/blockquote>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-content\/uploads\/2025\/01\/2.-Re-direct-Salesforce-Org.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px; align: center;\" src=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-content\/uploads\/2025\/01\/2.-Re-direct-Salesforce-Org.png\" alt=\"Re-direct Salesforce Org\"><\/a><\/center><font size=\"2\"><center><i> Re-direct Salesforce Org<\/i><\/center><\/font>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Prevent Login Unchecked<\/strong>\n<ul class=\"wp-block-list\">\n<li>After enabling the setting, attempt to log in to your Salesforce org. <\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-content\/uploads\/2025\/01\/3.-Prevent-Login-Unchecked.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px; align: center;\" src=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-content\/uploads\/2025\/01\/3.-Prevent-Login-Unchecked.png\" alt=\"Prevent Login from Checkbox\"><\/a><\/center><font size=\"2\"><center><i> Prevent Login from Checkbox <\/i><\/center><\/font>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You will encounter an error, as access via the default Salesforce URL is now blocked.<\/li>\n\n\n\n<li>This issue arises when the Organization Administrator activates &#8220;Prevent login from <a href=\"https:\/\/login.salesforce.com\" target=\"_blank\" rel=\"noopener\">https:\/\/login.salesforce.com<\/a>&#8221; or &#8220;Prevent login from <a href=\"https:\/\/test.salesforce.com\" target=\"_blank\" rel=\"noopener\">https:\/\/test.salesforce.com<\/a>&#8221; while setting the Redirect Policy to &#8220;Not redirected (Recommended).&#8221; Users attempting to log in with generic Salesforce URLs or incorrect My Domain URLs will face login issues.<\/li>\n\n\n\n<li>Have users log in using the correct My Domain URL.<\/li>\n<\/ul>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-content\/uploads\/2025\/01\/4.-Error.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px; align: center;\" src=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-content\/uploads\/2025\/01\/4.-Error.png\" alt=\"Login Error\"><\/a><\/center><font size=\"2\"><center><i> Login Error <\/i><\/center><\/font>\n\n\n\n<p>By following the above blog instructions, you will be able to learn \u201c<strong>My Domain Login Enforcement in Salesforce<\/strong>\u201d. If you still have queries or any related problems, don\u2019t hesitate to contact us at <a href=\"mailto:salesforce@greytrix.com\" target=\"_blank\" rel=\"noreferrer noopener\">salesforce@greytrix.com<\/a>. More details about the Product are available on <a href=\"https:\/\/www.greytrix.com\/salesforce-cloud-services\/\" target=\"_blank\" data-type=\"link\" data-id=\"https:\/\/www.greytrix.com\/salesforce-cloud-services\/\" rel=\"noreferrer noopener\">our website<\/a> and <a href=\"https:\/\/appexchange.salesforce.com\/listingDetail?listingId=a0N30000000psM5EAI\" target=\"_blank\" rel=\"noreferrer noopener\">Salesforce AppExchange<\/a>.<\/p>\n\n\n\n<p>We hope you may find this blog resourceful and helpful. However, if you still have concerns and need more help, please contact us at <a href=\"mailto:salesforce@greytrix.com\" target=\"_blank\" rel=\"noreferrer noopener\">salesforce@greytrix.com<\/a>.<\/p>\n\n\n\n<p><strong>Related Posts<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/2023\/07\/20\/grant-login-access-to-salesforce-admin-or-support\/\" target=\"_blank\" data-type=\"link\" data-id=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/2023\/07\/20\/grant-login-access-to-salesforce-admin-or-support\/\" rel=\"noreferrer noopener\">Grant Login Access to Salesforce Admin or Support in Salesforce Lightning Interface.<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/2016\/02\/04\/granting-login-access-to-salesforce-admin-or-support\/\" target=\"_blank\" data-type=\"link\" data-id=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/2016\/02\/04\/granting-login-access-to-salesforce-admin-or-support\/\" rel=\"noreferrer noopener\">Granting Login Access to Salesforce Admin or Support.<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/2015\/07\/27\/salesforce-administrators-can-now-login-as-any-user-in-salesforce\/\" target=\"_blank\" data-type=\"link\" data-id=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/2015\/07\/27\/salesforce-administrators-can-now-login-as-any-user-in-salesforce\/\" rel=\"noreferrer noopener\">Salesforce Administrators can now login as any user in Salesforce.<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/2014\/04\/21\/one-link-direct-login-to-salesforce\/\" data-type=\"link\" data-id=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/2014\/04\/21\/one-link-direct-login-to-salesforce\/\" target=\"_blank\" rel=\"noreferrer noopener\">One link directs login to Salesforce.<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>This blog encapsulates the functionality of the checkbox and its implications for user logins and security. Enabling &#8220;Prevent login from https:\/\/login.salesforce.com&#8220; ensures all users must use your Salesforce org&#8217;s unique My Domain URL to log in. This enhances security, customizes the login experience, and simplifies API integrations by requiring a consistent, branded URL for access.\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/2025\/01\/24\/enhancing-salesforce-security-how-to-implement-my-domain-login-restrictions\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[10,1935,1978,1981,1977,872,873,1983,1979,987,1982,1980,1984,870,482],"class_list":["post-10315","post","type-post","status-publish","format-standard","hentry","category-salesforce-srv","tag-administrator","tag-assign-users","tag-enforcement","tag-generic-salesforce-urls","tag-login-access","tag-login-settings","tag-manage-salesforce-users","tag-my-domain-url","tag-mydomain","tag-profile","tag-redirect-policy","tag-salesforce-administrator-setup-2","tag-salesforce-security","tag-salesforce-security-controls","tag-support"],"_links":{"self":[{"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/posts\/10315","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/comments?post=10315"}],"version-history":[{"count":3,"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/posts\/10315\/revisions"}],"predecessor-version":[{"id":10322,"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/posts\/10315\/revisions\/10322"}],"wp:attachment":[{"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/media?parent=10315"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/categories?post=10315"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/tags?post=10315"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}