How to Enable and Disable Two-Factor Authentication (2FA) for cPanel/WHM

  • Home
  • Uncategorized
  • How to Enable and Disable Two-Factor Authentication (2FA) for cPanel/WHM
How to Enable and Disable Two-Factor Authentication (2FA) for cPanel/WHM
DateJul 7, 2025

In today’s digital world, securing your hosting account is more important than ever. Two-Factor Authentication (2FA) adds an extra layer of security to your cPanel or WHM account by requiring not just your password, but also a unique code from a mobile device.

Whether you’re a website owner using cPanel or a server administrator using WHM, this guide will walk you through the steps to enable and disable Two-Factor Authentication.

What is Two-Factor Authentication (2FA)?

2FA requires two forms of verification:

  1. Something you know – your password.
  2. Something you have – a code from an authentication app on your smartphone (like Google Authenticator, Authy, etc.).

Even if someone gets your password, they can’t log in without the 2FA code.


How to Enable 2FA in cPanel

Step 1: Log in to your cPanel account

Use your cPanel URL, typically something like:

https://yourdomain.com:2083

Step 2: Navigate to the Security section

Look for the Two-Factor Authentication icon and click on it.

Step 3: Click Set Up Two-Factor Authentication

You’ll see a QR code and a manual key.

Step 4: Scan the QR Code

  1. Open your 2FA app (e.g., Google Authenticator).
  2. Tap the “+” or “Add” button.
  3. Choose Scan QR code and scan the code displayed on cPanel.
    • Alternatively, use the manual key.

Step 5: Enter the 6-digit code

Your authenticator app will show a 6-digit code that changes every 30 seconds. Enter the current code into cPanel and click Configure Two-Factor Authentication.

Success

You’ll receive a confirmation that 2FA is now active. You’ll need your 6-digit code every time you log in to cPanel.
How to Disable 2FA in cPanel

  1. Log in to your cPanel account.
  2. Go to Two-Factor Authentication in the Security section.
  3. Click Remove Two-Factor Authentication.
  4. Confirm the removal.

That’s it! 2FA is now disabled for your cPanel account.

How To Manage 2FA in WHM (WebHost Manager)

If you’re a server administrator or hosting provider, you can enable, configure, or disable 2FA globally for your cPanel users via WHM.

Enable 2FA in WHM

  1. Log in to WHM: https://yourdomain.com:2087
  2. Search for Two-Factor Authentication in the WHM sidebar.
  3. Click Manage My Account to enable 2FA for the WHM root or reseller account.
    • Follow the same QR code scanning and code input process as with cPanel.
  4. Click Manage Users to enable or enforce 2FA for cPanel accounts.

Optional: Enforce 2FA

You can force all users to set up 2FA by enabling enforcement:

  • Go to WHM → Two-Factor Authentication
  • Click Manage Users
  • Under Enforcement Settings, check “Force Two-Factor Authentication”
  • Save changes

How To Disable 2FA for a User (via WHM)

To remove 2FA for a specific user:

  1. In WHM, go to Two-Factor Authentication → Manage Users.
  2. Find the user in the list.
  3. Click Remove 2FA for that user.

Recommended 2FA Apps

  • Google Authenticator (iOS & Android)
  • Authy – backup and multi-device support
  • Microsoft Authenticator
  • LastPass Authenticator

Troubleshooting Tips

  • Time Sync: Ensure your phone’s time is accurate and synced automatically.
  • Lost Phone?: You’ll need to contact your hosting provider or use WHM (if root user) to remove 2FA.
  • Backup Codes: cPanel does not support backup codes. Consider using Authy for account recovery features.

Conclusion

Two-Factor Authentication significantly boosts your account’s security. Whether you’re managing a single cPanel account or running a full WHM server, enabling 2FA is a smart move to prevent unauthorized access.

Taking just a few minutes today to set up 2FA can save you from major headaches tomorrow. Think of it as locking the door and setting the alarm on your digital home.

Stay secure. Stay protected. Enable 2FA today.


🔗 Useful Link:
Official cPanel Documentation – Two-Factor Authentication

Leave a Reply