Sub topic 7
Logging in through your My Domain URL
This chapter assumes you have already signed up for a Developer Edition org, verified your email, set a password, and registered multi-factor authentication (MFA). You should be comfortable with basic browser use and, for the last section, a terminal.
What My Domain is
My Domain is a custom subdomain that Salesforce assigns to your org. Every Developer Edition org has one. It looks like this:
https://yourcompany-dev-ed.my.salesforce.comThe subdomain part, yourcompany-dev-ed, is unique to your org. Salesforce builds it from the company name you entered on the sign-up form, and it ends in -dev-ed.
The My Domain URL matters for three reasons:
- It takes you straight to your own org's login page.
- Links and sessions in your org use it, so your bookmarks keep working.
- Some features, such as Lightning components and single sign-on, need it.
Finding your URL
The email that said "Welcome to Salesforce" contains a link to your org. The same email lists your username. Keep it. If you lose it, search your inbox for "Developer Edition" or "My Domain".
Once you are logged in, you can also read the URL in your browser's address bar. In Setup, enter "My Domain" in the Quick Find box and open the page to see the full domain name.
Logging in step by step
- Open your My Domain URL in the browser.
- Enter your username. It has the same format as an email address, but it does not have to be your real email address.
- Enter your password and select Log In.
- Salesforce asks for your MFA verification. Approve the prompt in your authenticator app or enter the code it shows.
- You land on the Lightning Experience home page.
Tick Remember me to save your username on that browser. It does not save your password or skip MFA.
The generic login page
You can also log in at https://login.salesforce.com. This is the generic production login page. Enter your username and password there and Salesforce finds your org from the username.
Use your My Domain URL when you can. The generic page works for most people, but the My Domain page is the better habit. It always points at the right org, and it is the URL you should give to tools that ask for a login URL.
Common problems at this step
| Symptom | Likely cause | Fix |
|---|---|---|
| "Your login attempt has failed. Make sure the username and password are correct." | Typo, or a wrong username format. | Retype the full username, including the part after the `@`. |
| The page does not load | The domain was mistyped. | Copy the link from the welcome email. |
| The MFA code is rejected | The phone clock is out of sync, or the code expired. | Wait for the next code and enter it quickly. Turn on automatic time on your phone. |
| You are locked out | Too many failed attempts. | Wait about 15 minutes, then try again. |
Note that Salesforce treats the username as a login name, not as a mailbox. A message sent to it does not reach you. Password reset emails go to the email address on your user record.
Checking the login from the command line
You can confirm that a My Domain URL belongs to your org by pointing the Salesforce CLI at it. This command opens a browser login and uses your My Domain as the login URL:
sf org login web --instance-url https://yourcompany-dev-ed.my.salesforce.com --alias my-dev-orgReplace the URL with your own. The CLI stores an authorization under the alias my-dev-org. A later chapter covers this step in detail.
Exercise
You enter the right username and password at your My Domain URL, but you cannot reach the home page. What is the next step in the login flow, and what is one cause of it failing?
Show answer
Salesforce asks for the MFA verification. It can fail because the code expired or because the phone's clock is out of sync, so the code does not match. Wait for the next code and enter it again.