# How to activate two-factor authentication or 2FA in cPanel?

Two-factor authentication (2FA) is a security measure that requires two forms of identification. After entering your password, you must enter a security code.\
An application installed on your mobile phone provides this code.\
Without your phone at hand, you will not be able to log in to cPanel.

{% hint style="info" %}
Two-factor authentication (2FA) only supports one simultaneous session.\
If you log out from one tab while having the control panel open in another tab, the session will close in all open tabs.
{% endhint %}

{% hint style="info" %}
As a **2FA** application for your mobile phone, **Android** or **iOS**, the following is recommended:

[Google Authenticator](https://support.google.com/accounts/answer/1066447?hl=en).
{% endhint %}

### Setting up Two-Factor Authentication (2FA)

To set up Two-Factor Authentication, follow these steps:

1. Click on **Setup Two-Factor Authentication**.
2. Link your cPanel account with your **2FA** application downloaded on your phone:
   * To automatically create the link, scan the **QR code** displayed with your application.
   * To manually create the link, enter the **Account** and **Key** information provided by your application.
3. Within your **2FA** application, retrieve the six-digit security code.

{% hint style="info" %}
The **2FA** application generates a new six-digit security code every 30 seconds.
{% endhint %}

4. Enter the six-digit security code in the **Security Code** text field.

{% hint style="warning" %}
You must enter the security code within 30 seconds. After the time expires, the application will generate a new six-digit code.
{% endhint %}

5. Click on **Setup Two-Factor Authentication**.

{% hint style="warning" %}
If you see an error message saying "**Could not set user configuration: Security code is not valid**", please contact SitiosHispanos technical support.
{% endhint %}

### Deleting two-factor authentication

To remove two-factor authentication, click on **Remove Two-Factor Authentication**.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.sitioshispanos.com/menu-principal/guias/web-hosting/opciones-avanzadas-cpanel/como-activar-la-autenticacion-de-dos-factores-o-2fa-en-cpanel.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
