Skip to Content

Why My Domain in Salesforce Lightning Improves Your Salesforce UX

By July 19, 2019

By Collin Zimmerman, Solution Engineer at KELL Partners

Imagine a way you could greet your team with a customized login page that features your brand. Or, think how great it would be to share a record link that never changes. No longer is that a dream; with My Domain it can be a reality. Your reality! 

My Domain is a free feature available in nearly every Salesforce org that lets you choose a custom branded URL for your team for accessing your instance of Salesforce. Setting it up is very easy and can be done over a coffee break. I’ve highlighted three benefits of My Domain below. In addition to consistent URLs, a branded login page, and custom Lightning Components, you will need My Domain to deploy social sign-on or single sign-on. Check out this Trailhead to learn more about single sign-on or read the support documentation.

One URL to Remember

If you’ve ever noticed, every few months your instance changes. This is part of Salesforce’s disaster prevention program called Continuous Site Switching which allows Salesforce to grow and update the backend infrastructure. With My Domain, you are provided a consistent URL that never changes. You can send out the URL to a specific record, report, dashboard, or any other record in Salesforce. As long as a user can access the record, they won’t have to worry about broken URLs. 

A Friendly ‘Hello’

With My Domain, you can customize the look of your login page. This gives your users visual reassurance they are in the correct place before they enter their credentials. Think of this as a custom welcome mat to your instance of Salesforce. If you choose, you can disable your team from accessing and require logging into only your custom domain. In my developer org, I’ve replaced the Salesforce logo, changed the background, and added a background of my dog. 


A sample customized login page with My Domain enabled

A sample customized login page with My Domain enabled.


Custom Components

Lightning Experience offers you hundreds of features to accomplish your organizations’ mission faster. Countless blogs, webinars, and a Trailhead module have been shared about switching and enhancing Lightning. One of the best productivity features an Admin has in Lightning is the ability to customize Lightning pages. Salesforce provides a framework for you to customize pages with Lightning Components. Your imagination is the limit of what custom Lightning Components can do! Developers have created components to generate documents, scroll images, or quickly enter gift information. To take advantage of these features, you will need to enable My Domain.


Steps to Enable My Domain in Your Salesforce Org


Four guided steps for enabling, testing, and deploying My Domain

Four guided steps for enabling, testing, and deploying My Domain.

  1. In setup, search for “My Domain” in the quick find navigation. Enter the desired domain name you’d like to register. You can use letters, numbers or hyphens in your domain name as long as the total characters are less than 34. Once entered, click “Check Availability.” If your domain name is available, click “Register Domain” otherwise modify. 
  2. After a few minutes, you’ll receive an email to begin testing the registered domain functionality. Return to the My Domain page in Setup and click login to test. In the URL you’ll notice your domain name. Once using your registered domain name, you’ll want to test your links. This is the part that can take the longest. You’ll want to look for any hardcoded URL references. You will want to update instance specific references (e.g., to your new My Domain. Hardcoded links typically hide in buttons, custom links, and formula fields. Check out this Knowledge Article for additional detail on finding hardcoded URLs
  3. Under Authentication Configuration, click “Edit.” Upload your organization’s logo that is 250px by 125px and set the background color. When you’re satisfied, click “Save.” If you’re unsure what this will look like, in a private browser type in your My Domain URL to preview.
  4. After sufficient testing, you are ready to deploy. Before you click “Deploy to Users” you will want to notify your users that change is coming. Inform them that once deployed, they will login by navigating to your registered My Domain. Let them know to update any bookmarks to the new My Domain specific URL structure. As an added layer of security, encourage them to only login to Salesforce when they see your custom branded login page.
  5. Now that My Domain is enabled, you’ll want to set the redirect policy. I recommend for the first few weeks setting the redirect policy, to “Redirect with a warning to the same page within the domain.” This will give a brief alert to anyone referencing an old URL to update their URL. I have an example of my warning redirect; you’ll notice it pulls branding elements from your custom login page. Eventually, you can update the redirect policy not to redirect when a page is accessed with the non-My Domain URL.
    A sample customized redirect page prompt displaying an alert that the record URL has changed.

    A sample customized redirect page prompt displaying an alert that the record URL has changed.


  6. You can also set the Login policy which restricts accessing the standard login page ( for your branded login.




About the Author

Collin Zimmerman is a Solution Engineer for KELL Partners. He is a problem solver, tech fixer, and learner. He supports nonprofit and educational institutions by listening to their challenges and mapping solutions into Nonprofit Cloud or Education Cloud. Collin brings almost a decade of industry experience when developing solutions for complex challenges. He evangelizes Lightning in the broader community as a Lightning Champion. Connect with him on LinkedIn or Twitter.