How to Set Up Two-Factor Authentication (2FA)
In this article
Two-factor authentication (2FA) adds a second layer of security to your accounts, so even if someone steals your password, they still can't get in without the second factor (usually a code from your phone). Setting it up takes about five minutes per account, and you'll need your phone and the app or website's security settings. Here's how to do it.
What You'll Need
- Your phone (for receiving codes via SMS or using an authenticator app)
- An authenticator app (like Google Authenticator, Microsoft Authenticator, or Authy) — optional but recommended
- Access to the account you want to secure (you'll need to log in)
- A backup method (like a spare phone number or printed backup codes)
Step-by-Step
- Log in to the account you want to protect (e.g., email, social media, bank).
- Go to the security settings. Look for "Security," "Privacy," or "Password & Security" in your account settings. On most sites, it's under a gear icon or your profile menu. Labels vary by service, so if you don't see it right away, search the help section for "two-factor authentication."
- Find the 2FA option. It might be called "Two-Step Verification," "Two-Factor Authentication," or "Login Verification." Click it to start setup.
- Choose your verification method. Most services offer several options:
- Authenticator app (recommended): This generates codes that change every 30 seconds. You'll scan a QR code with the app.
- Text message (SMS): You'll receive a code via text each time you log in. This is less secure than an app because SIM-swapping attacks exist, but it's better than nothing.
- Security key (if available): A physical USB or NFC device you plug in or tap.
- If using an authenticator app:
- Install an authenticator app from your phone's official app store (e.g., Google Authenticator for Android/iPhone, Microsoft Authenticator, or Authy).
- Open the app and tap the "+" or "Add account" button.
- Scan the QR code shown on your computer screen with the app. If scanning fails, you can manually enter the secret key shown on the screen.
- The app will now display a 6-digit code that refreshes every 30 seconds.
- Enter the code from your authenticator app or the one sent via SMS into the website's verification field, then click "Verify" or "Enable."
- Save your backup codes. Most services give you a set of one-time backup codes (usually 8–10 codes). Write them down and store them somewhere safe, like a password manager or a drawer. These are for when you lose your phone.
- Confirm setup. Some services ask you to enter a code again to confirm everything works. Do that, and you're done.
- Test it. Log out and log back in. You should be prompted for the second factor. If you can log in successfully, 2FA is working.
Common Mistakes
- Skipping backup codes — If you lose your phone and didn't save backup codes, you'll be locked out of your account.
- Using SMS when an app is available — SMS is convenient but less secure. If the service offers an authenticator app, use it.
- Not updating your phone number — If you change your number, update it in the account's security settings before you lose access.
- Sharing your backup codes — Keep them private. Anyone with your backup codes can bypass 2FA.
- Ignoring the "remember this device" option — On a personal device, it's okay to check this to avoid entering a code every time, but never on a shared or public computer.
Tips
- Use an authenticator app over SMS whenever possible. Apps like Google Authenticator work offline and are more secure.
- Store backup codes in a password manager (like Bitwarden, 1Password, or KeePass) so you can access them from any device.
- Set up 2FA on your email first — your email is often the key to resetting other passwords, so protect it first.
- Enable 2FA for your most important accounts: email, banking, social media, and any work accounts.
- If you use multiple authenticator apps, add the same account to two phones (e.g., your phone and a tablet) for redundancy.
Troubleshooting
If you're having trouble setting up or using 2FA, try these steps in order:
- Check the time on your phone. Authenticator apps rely on your device's clock being accurate. Go to your phone's settings and enable "Automatic date & time" (Android) or "Set Automatically" (iPhone).
- Make sure you're entering the code before it expires. Codes refresh every 30 seconds. If the code is about to change, wait for the next one.
- If the QR code won't scan, try manually entering the secret key shown on the screen. It's usually a long string of letters and numbers.
- If you're not receiving SMS codes, check that your phone number is correct in the account settings and that you have cell signal. Also, some carriers block short-code SMS; contact your carrier if this persists.
- If you lost your phone, use one of your backup codes. If you didn't save them, most services offer account recovery via email or security questions. Go to the service's login page and click "Need help?" or "Trouble logging in?"
- If the app says the code is invalid, remove the account from the authenticator app and re-add it by scanning the QR code again. You may need to temporarily disable 2FA on the service and re-enable it.
- As a last resort, contact the service's customer support. Be ready to prove your identity (e.g., by answering security questions or providing ID).
Frequently Asked Questions
Is 2FA really necessary?
Yes. It's the single most effective step you can take to protect your online accounts. Even if your password is stolen in a data breach, the attacker still needs your phone to get in.
Can I use the same authenticator app for multiple accounts?
Absolutely. One authenticator app can hold codes for dozens of accounts. Just tap "+" to add each one.
What if I lose my phone?
Use your backup codes. If you didn't save them, you'll need to go through the service's account recovery process, which may take a few days. That's why saving backup codes is crucial.
Is SMS 2FA better than no 2FA?
Yes, SMS is far better than nothing. However, it's vulnerable to SIM-swapping attacks, so use an authenticator app when available.
Can I turn off 2FA later?
Yes, you can disable it anytime in the same security settings where you enabled it. But we recommend keeping it on for security.
Why do I get asked for a 2FA code on a new device but not on my usual phone?
Most services let you "trust" a device for 30–90 days. On a new device, you'll be asked for the code until you check "Don't ask again on this device."