# Protect your cPanel account: two-factor authentication, a strong password and access without sharing it

https://www.gyrohosting.com/en/knowledgebase/article/cpanel-two-factor-authentication-account-security

- **What you will learn**: Which ways lead into cPanel and how to protect each one, where to turn on two-factor authentication, how to strengthen your cPanel password, and how to give email, FTP or script access without sharing your password with anyone.
- **Time**: 8 minutes

## 1. There are two ways into cPanel

Your hosting account's cPanel can be reached in two ways:

1. **From the client area:** **My Services** → your hosting service → **Login to cPanel**. This way, no cPanel password is asked; your client area session lets you in. So protecting your client area with two-factor authentication also protects cPanel logins made this way.
2. **From the cPanel login page directly:** with the username and cPanel password. Here, protection depends on the strength of your cPanel password.

You need to protect both: two-factor authentication in the client area, and a long, unique password in cPanel.

![You enter cPanel from the client area or directly from the login page. The first is protected by two-factor authentication, the second only by your cPanel password.](https://www.gyrohosting.com/resources/uploads/bilgi-merkezi/B46-01-en.webp)

## 2. Before you start

- Install an authenticator app on your phone (Google Authenticator, Microsoft Authenticator, Authy, 1Password, etc.).
- If you don't use a password manager, now is a good time to start: you don't need to memorise the cPanel password, only keep it somewhere safe.
- If you have shared your cPanel password with an agency or developer before, change it at the end of this guide.

## 3. Turn on two-factor authentication

### 3.1 In the client area (recommended and available on every account)

When you turn on two-factor authentication in the client area, reaching the panel, and therefore the **Login to cPanel** button, requires a one-time code from your phone as well as your password.

1. In the client area, open your account settings from the account menu at the top right.
2. Go to the two-step verification tab and press the set-up button next to a method.
3. Follow the steps on the screen and save the recovery key somewhere safe.

For the detailed steps, passkeys and trusted devices, see guide **A09 — Two-step verification, passkeys and a secure password**.

### 3.2 cPanel's own two-factor authentication

Whether cPanel's own two-factor authentication (2FA) screen can be used depends on the server's security policy. If the screen is available, it is in cPanel; during setup you scan the code on the screen with your phone app and finish the configuration by entering the 6-digit code the app generates.

If you see the warning **You do not have access to this feature** on the screen, cPanel 2FA is not available on that server. We saw this warning on our test account as well. In that case:

- Always enter cPanel with the **Login to cPanel** button in the client area (the protection in 3.1 applies).
- Keep the cPanel password used for direct login strong, as in Section 4.

![cPanel's own two-factor authentication screen depends on server policy. If you see this warning, get the protection from two-factor authentication in the client area.](https://www.gyrohosting.com/resources/uploads/bilgi-merkezi/B46-02-en.webp)

## 4. Strengthen your cPanel password

1. In cPanel, open **Password & Security** in the **Preferences** section.
2. Type your current password in **Old Password**.
3. Create a long, random password with **Password Generator**, or type a password of at least 16 characters that you don't use anywhere else. Enter it in **New Password** and **New Password (Again):**.
4. Press **Change your password now!**

![Preferences → Password & Security: enter your old password and the new one twice; use Password Generator for a strong password.](https://www.gyrohosting.com/resources/uploads/bilgi-merkezi/B46-03-en.webp)

> **Info**
> 
> When you change the password, your open cPanel session ends. The **Enable Digest Authentication** option is only needed for some older Web Disk connections; leave it off if you don't need it.

## 5. Give access without sharing your password

Whoever gets your cPanel password can reach everything in your account: files, databases, email, backups. Give only as much access as is needed instead.

### 5.1 For email, FTP or Web Disk: User Manager

1. Open **User Manager** in the **Preferences** section and click **Add User**.

![Preferences → User Manager: give each person their own subaccount. A subaccount can use only the email, FTP or Web Disk service you allow and cannot log in to cPanel.](https://www.gyrohosting.com/resources/uploads/bilgi-merkezi/B46-04-en.webp)

1. Under **Basic Information**, type the username and choose the **Domain**.
2. Under **Security Information**, keep **The user will set the account password.**; the person gets an email to set their own password, and the password never reaches you.
3. Under **Services**, turn on only the service that is needed. If you give a developer FTP, limit the **Home Directory** to the relevant folder only (for example `public_html/gyro-test/`).
4. Press **Create**.

![In the Add User form, turn on only the service that is needed; for FTP and Web Disk, limit the Home Directory to the relevant folder.](https://www.gyrohosting.com/resources/uploads/bilgi-merkezi/B46-05-en.webp)

Subaccounts cannot log in to cPanel; they use only the service you allow. When the work is done, remove access with **Delete** on the row.

### 5.2 For a script or app: an expiring API token

If an application or a backup script needs to connect to cPanel, use an API token instead of the password.

1. Open **Manage API Tokens** in the **Security** section.
2. In **API Token Name**, type a name that says what the token is for (for example `gyro-yedek-betik`).
3. Set an expiry date with **Specify an expiration date.**
4. Press **Create**; the token is shown only once, so save it somewhere safe immediately.

![Security → Manage API Tokens: create an API token with an expiry date for a script or app instead of using your password; the token can do anything you can.](https://www.gyrohosting.com/resources/uploads/bilgi-merkezi/B46-06-en.webp)

> **Warning**
> 
> As the warning on the screen says, the token can access every API you can access. Revoke tokens you don't use from the same screen; if a token leaks, delete it at once.

## 6. Check that the protection works

- Log out of the client area and log in again: after the password, a verification code should be asked.
- A direct login attempt with the old cPanel password should fail.
- The User Manager list should contain no subaccounts you don't recognise or no longer need, and Manage API Tokens should contain no tokens without an expiry that you don't use.

## 7. Symptom → cause → fix

| Symptom | Likely cause | Fix |
| --- | --- | --- |
| "You do not have access to this feature" on the cPanel 2FA page | Server policy turns off cPanel 2FA | Turn on 2FA in the client area and enter cPanel with **Login to cPanel** (Section 3) |
| I changed the password and was logged out of cPanel | The session ends when the password changes | Log in again from the client area |
| I lost my phone and can't get into the client area | The authenticator app was on the phone | Log in with the recovery key; otherwise contact support (**A09**) |
| The agency sees the whole account over FTP | The FTP user's home directory is too wide | Narrow the subaccount's **Home Directory** to the relevant folder |
| An unknown script still connects to cPanel | An old API token with no expiry | Revoke it in Manage API Tokens and change the cPanel password |
| There are changes in my files I don't recognise | The password may have leaked | Change the password, review subaccounts and tokens, open a support ticket |

## 8. Frequently asked questions

**Is my cPanel password the same as my client area password?**

No, they are separate. The client area password protects your invoices and all your services; the cPanel password is only for logging in to that hosting account directly. Use different passwords for the two.

**Should I always enter cPanel from the client area?**

That is what we recommend. Two-factor authentication applies on this path, and you don't need to write the cPanel password down anywhere.

**I need to give a developer temporary access; what is the safest way?**

In User Manager, create a subaccount with only FTP turned on and the home directory limited to the relevant folder. Delete the subaccount when the work is done. If you do have to give out your cPanel password, change it as soon as the work is finished.

**Where should I keep an API token?**

In a password manager or in the secret settings of the app that uses it. Don't share the token by email, in a messaging app, or as plain text in a code repository.

**I suspect my account was taken over. What should I do?**

First change the client area and cPanel passwords, then review subaccounts and API tokens and open a support ticket (**A08**). If there are unexpected files on your site, mention them in the ticket.

> **Did you know?**
> 
> In the client area you can also use a passkey instead of a password; you log in with your phone's or computer's fingerprint or face recognition, which is much safer against phishing pages than typing a password (see **A09**).

## 9. Related guides

- **A09** — Protect your account: two-step verification, passkeys and a secure password
- **B45** — Password-protecting a folder and blocking IP addresses
- **B09** — My site returns 403 Forbidden
- **A08** — Opening a support ticket
