Cloudflare

How to Set Up 2FA on Cloudflare

Protect a Cloudflare account with 2FA, save backup codes, and plan administrator recovery before DNS changes are blocked.

Estimated time: 5-12 min Audience: Site owners, developers, and administrators Recovery: Backup codes, Account recovery, Administrator access risk

Official path

Cloudflare dashboard My Profile Authentication Two-Factor Authentication Mobile App Authentication Backup codes

Before you start

  • Verify your email address before you add a second factor.
  • Plan for at least two authentication methods before you finish setup.
  • Keep the backup codes in a safe offline place.

Setup steps

  1. 01

    Open profile authentication

    From Cloudflare dashboard, open My Profile, then Authentication.

  2. 02

    Set up app-based 2FA

    Open Two-Factor Authentication, choose Set up, then select Mobile App Authentication and Add.

  3. 03

    Scan the QR code

    Use the authenticator app to scan the QR code, or choose Can't scan QR code if you need the manual path.

  4. 04

    Finish and save backup codes

    Enter the code from the app, finish setup, then download, print, or copy the backup codes from the backup codes page.

Recovery and backup

Open backup codes

Go back to My Profile, then Authentication, then Manage, then Backup codes.

Regenerate only when ready

Use Regenerate to create a new set only after the old set is safely replaced, because old codes stop working.

Use another method when locked out

If the page shows security key prompts, switch to try another authentication method or backup code.

Common problems

Verified email required

Cloudflare expects a verified email address first, or you can lock yourself out.

SSO limitation

Cloudflare notes that SSO accounts cannot configure the same 2FA flow.

Backup codes are one-time use

One code is consumed per recovery sign-in, and Regenerate invalidates the old set.

Related questions

Reference checkpoints

My ProfileAuthenticationBackup codes