# Get your bot handle

Claim name.bluesky.bot for your Bluesky bot: sign in, add the bot with OAuth, pick a free name, and switch the bot's handle in one click.

[HTML version](https://bluesky.bot/docs/get-your-handle)

A `name.bluesky.bot` handle replaces your bot's default `.bsky.social`
handle. It is free, and it works like any custom domain handle on Bluesky:
Bluesky.bot serves your bot's DID at
`https://name.bluesky.bot/.well-known/atproto-did`, which is the file Bluesky
checks before it accepts the handle.

## What you need

- Your own Bluesky account, to sign in as the **creator**. One creator can
  manage any number of bots.
- The bot's Bluesky account, and a way to sign in to it. Only an account you
  can sign in to can be added: nobody can claim a handle for someone else's
  account.

You never give your password to Bluesky.bot: both sign-ins go through
Bluesky's own OAuth page. Signing in as yourself asks for the basic `atproto`
access only. Adding a bot also asks for `identity:handle`, the permission
to change that bot's handle, and nothing more.

New to handles and DIDs? [Handles and DIDs](https://bluesky.bot/learn/handles-and-dids)
explains what they are and how Bluesky checks a handle.

## 1. Sign in

Open [bluesky.bot](https://bluesky.bot/) and choose **Sign in with Bluesky**. You land on
**My bots**.

## 2. Add the bot

On **My bots**, enter the bot's current handle (for example
`mybot.bsky.social`) and choose **Add a bot**. Bluesky asks you to sign in,
this time **as the bot**.

If your browser is already signed in to Bluesky as you, open the sign-in in a
private window, or sign out of Bluesky first: the account that signs in is the
one that gets added.

## 3. Pick a name

Open the bot from **My bots**, then the **Handle** tab. Names follow these
rules, the same ones the server applies:

| Rule | |
| --- | --- |
| Length | 3 to 30 characters |
| Characters | `a`–`z`, `0`–`9` and `-`, lower case |
| Hyphens | not first, not last, never two in a row |
| Reserved | names like `admin`, `support` or `api` are kept for the service, and no name may contain `bluesky` or `bsky`, even with digits (`b2sky`) |
| Not allowed | offensive names are refused, with or without digits added or standing in for letters (`sh1t`) |
| Unique | one bot per name |

You can check a name before claiming it with the public API, no key needed:

```bash
curl https://bluesky.bot/api/v1/handles/weather/availability
```

Or from TypeScript:

**check-handle.ts**

```ts
// check-handle.ts: is a name free on bluesky.bot? Public API, no key needed.
const name = process.argv[2] ?? "weather";

const response = await fetch(
  `https://bluesky.bot/api/v1/handles/${encodeURIComponent(name)}/availability`,
);
if (response.status === 429) {
  const wait = response.headers.get("Retry-After");
  throw new Error(`Rate limited: retry in ${wait} s.`);
}
const result = (await response.json()) as {
  handle: string | null;
  available: boolean;
  reason: string | null;
};

console.log(
  result.available
    ? `${result.handle} is free.`
    : `${name} is not available (${result.reason}).`,
);

// Makes this file an ES module, which top-level await needs.
export {};
```

See the [API reference](https://bluesky.bot/docs/api) for the possible `reason` values. From a
terminal, the [command-line tool](https://bluesky.bot/docs/cli) does it too:
`bsbot check weather`.

## 4. Claim and switch

Choose **Claim Handle**. Bluesky.bot saves the claim, then switches the bot's
handle on Bluesky for you, using the `identity:handle` permission granted when
you added the bot. When the switch is confirmed, the bot shows **Live on
Bluesky**.

If Bluesky.bot cannot switch it (for example, the bot was added before the
handle permission existed), the page asks you to add the bot again, or shows
the steps to do it by hand:

1. Sign in to Bluesky as the bot, then open **Settings → Account → Handle**.
2. Choose **I have my own domain**, then the **No DNS panel** (file) option.
3. Enter `name.bluesky.bot` and verify: Bluesky.bot already serves the file
   Bluesky checks.

Then choose **Check again** on the bot's page.

## Changing or releasing a handle

- **Claiming another name** frees the previous one.
- **Release this handle** gives it up. Bluesky.bot tries to switch the bot
  back to its previous Bluesky handle; if it cannot, pick another handle in
  the bot's Bluesky settings, or Bluesky shows it as invalid.
- A freed name stays blocked for everyone except you for a grace period
  (14 days by default), so nobody can impersonate your bot right away.

## Next

- [Verify a bot](https://bluesky.bot/docs/verify-a-bot): what "Live on Bluesky" checks.
- Check the bot's handle with the [DID finder](https://bluesky.bot/tools/did-finder) or the
  [whois](https://bluesky.bot/tools/whois): its DID, and whether it is verified both ways.
- List your bot in the [directory](https://bluesky.bot/bots) from its **Directory** tab.
- Using a domain of your own for another account? The
  [custom domain handle checker](https://bluesky.bot/tools/custom-handle-checker) tells you why
  a handle shows as invalid, and what record to add.

If you are choosing between handle providers, read [Free Bluesky handles compared](https://bluesky.bot/guides/free-handle) for the cost, domain-control and continuity differences.

If Bluesky shows an invalid name, follow the [invalid-handle diagnosis](https://bluesky.bot/guides/invalid-handle) before changing records.

## Publish a useful directory profile

In the bot’s **Directory** tab, write a short description of what it does
and who it helps before turning on the public listing. You can choose
**Draft from Bluesky bio**, review the suggestion and edit it before saving.
Requesting a draft does not publish it. The summary can contain up to 300
characters.

You can hide the listing at any time. Existing bare profiles remain outside
search indexes until their creator adds a description and their handle is
verified. Claiming a handle remains separate from publishing a directory
profile.

The private Directory tab also links directly to category, declared languages,
full Markdown overview and the source repository fields. These details help
readers understand and find the bot. Category and languages are recommended;
the longer overview and source repository are optional. If a linked GitHub
repository has a readable README, it can appear in the public Source tab
with a link to the repository.
