Set-up 2FA
Last updated Apr 23, 2026 Two-factor authentication (2FA) allows user account owners to add an additional layer of login security to Cloudflare accounts. This additional authentication step requires you to provide both something you know, such as a Cloudflare password, and something you have, such as an authentication code from a mobile device.
Note
Cloudflare user accounts configured to use single sign-on (SSO) cannot configure 2FA.
Cloudflare offers the option to use either a phishing-resistant security key, like a YubiKey, or a Time-Based One-Time password (TOTP) mobile app for authentication, like Google Authenticator, or both. If you add both of these authentication methods to your account, you are initially prompted to log in with the security key, but can opt-out and use TOTP instead.
To ensure that you can securely access your account even without your mobile device or security keys, Cloudflare also provides backup codes for download.
Tip
After downloading your backup codes, we recommend saving them in a secure location.
As the user account owner, you are automatically assigned the Super Administrator role. Once 2FA is enabled, all Cloudflare account members are required to configure 2FA on their mobile devices.
Enable 2FA
We recommend that all Cloudflare user account holders enable two-factor authentication (2FA) to keep your accounts secure.
2FA can only be enabled successfully on an account with a verified email address. If you do not verify your email address first, you may lock yourself out of your account.
Caution
Super Administrators can turn on 2FA Enforcement to require all members to enable 2FA. If you are not a Super Administrator, you will be forced to turn on 2FA prior to accepting the invitation to join a Cloudflare account as a member.
To enable two-factor authentication for your Cloudflare login:
- Log in to the Cloudflare dashboard ↗︎.
- Under the My Profile dropdown, select My Profile.
- Select Authentication.
- Select Add next to Mobile App Authentication or Security Key Authentication, or Enable next to Email Authentication.
Note
Cloudflare recommends that users enable at least two different 2FA factors, as well as safely store backup codes) to prevent lockouts.
Additional configurations
Cloudflare also supports 2FA with device built-in authenticators (Apple Touch ID, Android fingerprint, or Windows Hello), Yubikeys and TOTP mobile applications.
Was this helpful?
YesNo
On this page
{"@context":"https://schema.org","@type":"WebPage","@id":"https://developers.cloudflare.com/learning-paths/application-security/account-security/set-up-2fa/#page","headline":"Set-up 2FA","description":"Configure two-factor authentication for account security.","url":"https://developers.cloudflare.com/learning-paths/application-security/account-security/set-up-2fa/","inLanguage":"en","image":"https://developers.cloudflare.com/learning-paths/application-security/account-security/set-up-2fa/og.png?v=1614100606f58e40","dateModified":"2026-04-23","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}
description: Protect web applications with Cloudflare security products. title: Default traffic security image: https://developers.cloudflare.com/learning-paths/application-security/default-traffic-security/og.png?v=89c9f71c338216bf
Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/learning-paths/llms.txt
Use this file to discover all available pages before exploring further.
Docs