How to Log Into a Salesforce Sandbox
Salesforce Sandboxes are isolated copies of your production org used for development, testing, and training. They have their own login URL and modified credentials, which is the most common source of confusion.
Sandbox Login URL
Unlike production, sandbox environments use a different login endpoint:
| Type | URL |
|---|---|
| Standard sandbox login | test.salesforce.com |
| Enhanced domain sandbox | yourcompany--sandboxname.sandbox.my.salesforce.com |
Important
Never use login.salesforce.com for sandboxes. It will reject your sandbox credentials.
Step-by-Step Login Instructions
1 Open the correct URL. Navigate to test.salesforce.com or your sandbox-specific My Domain URL.
2 Determine your sandbox username. Salesforce appends the sandbox name to your production username:
Production username: [email protected]
Sandbox name: QA
Sandbox username: [email protected]The sandbox name suffix is case-sensitive — if your sandbox is called "QA", you must type .QA, not .qa.
3 Enter your password. When a sandbox is first created (via refresh or clone), your password is reset. Check your email for a password-reset link from Salesforce. For Developer and Developer Pro sandboxes, the password defaults to your production password at the time the sandbox was created.
4 Complete MFA. If MFA is enforced in the sandbox (it inherits your production MFA settings), approve the prompt in Salesforce Authenticator or enter your TOTP code.
Common Sandbox Login Errors
"Invalid username or password"
This is almost always caused by one of these issues:
- Wrong URL — You are on
login.salesforce.cominstead oftest.salesforce.com. - Missing sandbox suffix — You forgot to append
.SANDBOXNAMEto your username. - Case mismatch — Sandbox names are case-sensitive.
- Expired sandbox — Partial Copy and Full sandboxes expire after 30 days without a refresh.
"Your login attempt has failed"
This often occurs after a sandbox refresh. Each refresh resets the sandbox, including user credentials. You need to use the new password reset link sent to your email after the refresh completes.
"This sandbox org has been deleted or is unavailable"
The sandbox may have been deleted by an admin or could still be in the process of being created. Sandbox creation can take anywhere from minutes to hours depending on the type.
Sandbox Types and Login Differences
| Sandbox Type | Copies Data? | Password Behavior | Refresh Interval |
|---|---|---|---|
| Developer | No | Matches production at creation time | 1 day |
| Developer Pro | No | Matches production at creation time | 1 day |
| Partial Copy | Sampled data | Requires reset after creation | 5 days |
| Full Copy | Yes, all data | Requires reset after creation | 29 days |
Tips for Managing Multiple Sandboxes
Managing several sandboxes becomes easier with a few habits:
- Use a password manager and create separate entries for each sandbox, including the full username with the sandbox suffix.
- Bookmark each sandbox URL with a descriptive name (e.g., "SF – QA Sandbox" or "SF – Dev Sandbox").
- Color-code your browser tabs using browser profiles or extensions to visually distinguish production from sandbox sessions.
Pro Tip
In Salesforce Setup, you can customize the sandbox header color (Setup → Sandboxes → Edit) so you never accidentally make changes in production.
