> ## Documentation Index
> Fetch the complete documentation index at: https://docs.namespace.ninja/llms.txt
> Use this file to discover all available pages before exploring further.

# Check subname availability

> Registry-level ownership checks for a subname.

> [!WARNING]
>
> Mint Manager is deprecated. It keeps working for onchain listings on ENSv1 names. For new integrations, use [offchain subnames](https://docs.namespace.ninja/developer-guide/guide/create-offchain-subnames.md), or issue onchain subnames from the [Namespace App](https://docs.namespace.ninja/user-guide/app.md). See [ENSv2 and Namespace](https://docs.namespace.ninja/overview/ensv2.md).

`isL1SubnameAvailable` and `isL2SubnameAvailable` report raw registry ownership. Use the method that matches the parent name's listing: `isL1SubnameAvailable` for Ethereum, or `isL2SubnameAvailable` for an L2 chain.

> [!WARNING]
>
> Both methods are deprecated in favor of [`checkName`](https://docs.namespace.ninja/developer-guide/sdks/mint-manager/check-name). `checkName` reports registry ownership and whether the minter is permitted to mint, and it takes the chain from the listing. A `true` from these methods can still be followed by a failed mint, because an allowlist, a reservation, or an expired listing is invisible to the registry. Use them only when you want ownership alone and have no minter address in hand.

## Check availability on Ethereum

Use `isL1SubnameAvailable` for a parent name listed on Ethereum mainnet:

```typescript theme={null}
const isAvailable = await mintClient.isL1SubnameAvailable(
  'alice.example.eth',
);
```

## Check availability on L2 chains

Use `isL2SubnameAvailable` with the target chain ID. This example checks Base:

```typescript theme={null}
import { base } from 'viem/chains';

const isAvailable = await mintClient.isL2SubnameAvailable(
  'alice.example.eth',
  base.id,
);
```

## Handle lookup failures

Both methods throw `RPC_ERROR` when the registry cannot be reached. A failed lookup is not an answer about the name, and reporting it as "taken" tells a user a free name is gone.

```typescript theme={null}
import { MintManagerError } from '@thenamespace/mint-manager';

try {
  const isAvailable = await mintClient.isL1SubnameAvailable('alice.example.eth');
} catch (error) {
  if (error instanceof MintManagerError && error.code === 'RPC_ERROR') {
    // Temporary lookup failure. Offer a retry rather than a result.
  }
}
```

Because these methods read from an RPC endpoint, supply your own through `customRpcUrls` for anything user facing. The default is a shared public endpoint and is rate limited.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.