# Rekey an Account

Rekeying is a powerful Algorand protocol feature that delegates control to another account. As an account holders you can keep a public address but assign different private keys. After rekeying, the *'Rekeyed-to'* account gains full control over the original account.

Common use cases are:

* Changing the ownership of an account
* Securing a potentially compromised account with [new signing keys](#how-to-rekey-an-account-hot-wallet)
* Securing a hot account with a [Ledger device](#how-to-rekey-an-account-ledger)

## How to Rekey an Account (Hot Wallet)

1. **Select the account you want to rekey.** From the account side bar, swipe left on the account and tap edit.
2. **Assign the account you want to be in control.** Tap the 'Rekeyed to' field and select the desired account. Make sure this account is secure. When in doubt, create a new account for this.&#x20;
3. Tap "Rekey", then double-check the request in the preview and confirm.&#x20;
4. **Done** - You should now see a small rekey symbol next to the original account in the account list. The "Rekeyed to" field should also be populated and point to the account in control. Any signing transaction will be delegated to this newly assigned account.

<figure><img src="/files/xZyuvi6ZsTKBzpycUprS" alt=""><figcaption></figcaption></figure>

Select *'Edit'* and *'Rekeyed to'* to begin the process. In the Rekey account view, choose the account you want to be in control.

<figure><img src="/files/EzqA6zq7kyKOMhJi5GSj" alt=""><figcaption></figcaption></figure>

When you're ready, select *'Rekey account'* and swipe to confirm on the following screen:

You should now see a small rekey symbol next to the *original* account in the account list. The *'Rekeyed to'* field should also be populated.

You can confirm the rekey was successful by setting up a swap and ensuring the *'Rekeyed to'* field is shown before you swipe to confirm the transaction:

<figure><img src="/files/XsZbZCmSTMSzr17KVDnN" alt=""><figcaption></figcaption></figure>

Watch the video below if you need any additional help with this process:

{% embed url="<https://youtu.be/Fa2E8Rv4H28>" %}

{% hint style="info" %}
The *'Rekeyed-to'* account has full control over your *original* account. Only the account in control can undo the rekey operation. Without access to the *'Rekeyed-to'* account, your *original* account becomes inaccessible.
{% endhint %}

{% hint style="info" %}
To backup and restore a rekeyed account you need to safekeep the mnemonic (seed phrase) of both accounts, *original* and *'Rekeyed-to' account*.&#x20;
{% endhint %}

## How to Rekey an Account (Ledger)

For added security, you can rekey your account to a Ledger. If you need help creating a Ledger account, review how to add a Ledger account on Defly Wallet [here](/defly-manual/app/add-an-account.md#create-a-ledger-account).

Select 'Edit' and 'Rekeyed to' to begin this process. In the Rekey account view, choose the Ledger account, select "Rekey account", and swipe to confirm the action:

<figure><img src="/files/gRQfdBhxU3tDBrzqt2oc" alt=""><figcaption></figcaption></figure>

You can confirm the rekey was successful by setting up a swap and ensuring the *'Rekeyed to'* field shows the Ledger account (before you swipe to confirm the transaction):

<figure><img src="/files/hUO2AmuUgJtt2C3GsnLH" alt=""><figcaption></figcaption></figure>

Connect your Ledger and confirm the transaction on this device. If the rekey was successful, the transaction will go through as expected.

## Can a rekey operation be fully reverted?

Yes. To fully revert rekeying follow the same procedure and use the *original account* as the *rekey-to account.* In other words, you simply rekey the *original account* to itself.

{% hint style="info" %}
Only the *'Rekeyed-to' account* can authorize another rekeying operation. It is also the only account that can revert the rekeying.
{% endhint %}

## Technical details

For more information, please checkout: <https://developer.algorand.org/docs/get-details/accounts/rekey/>


---

# 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://defly.gitbook.io/defly-manual/app/rekey-an-account.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.
