> For the complete documentation index, see [llms.txt](https://bns-community.gitbook.io/bns-community/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bns-community.gitbook.io/bns-community/introduction-to-bns/how-does-bns-work.md).

# How does BNS work?

BNS functions as a decentralized Domain Name System (DNS) but for blockchain identities. It maps human-readable names to underlying blockchain addresses and metadata, making blockchain interactions simpler and more accessible.

**Key Components:**

1. **Names**:
   * Unique identifiers like `yourname.btc` or `yourbrand.id`.
   * Names are stored as on-chain records, ensuring immutability and security.
   * Users can associate their names with Stacks and Bitcoin wallet addresses.
2. **Namespaces**:
   * Each BNS name exists within a namespace (e.g., `.btc`, `.id`).
   * Custom namespaces can be created (e.g., `.brand`) and managed by their creators, enabling branded or purpose-specific names.
3. **Zonefiles**:
   * Metadata associated with a name (e.g., Bitcoin address, profile data) is stored off-chain in a **zonefile**, with its hash anchored on the blockchain.
   * Zonefiles ensure the flexibility to update information without altering on-chain records.

**How Names are Registered, Renewed, and Managed:**

1. **Registration**:
   * Users register names using Stacks tokens (STX) via dApps like [BNS One](/bns-community/introduction-to-bns-one/what-is-bns-one.md), btc.us or bnsv2.com.
   * The process involves sending a smart contract transaction to claim a unique name within a namespace.
2. **Renewals**:
   * Names typically have a renewal period to maintain ownership.
   * Renewals require small STX fees, ensuring active names are retained by engaged users.
3. **Transfers**:
   * Names can be securely transferred between addresses.
   * The transfer process is initiated through a smart contract to reassign ownership.
4. **Management**:
   * Owners can update zonefiles to change metadata, link new wallet addresses, or even sell/trade their names on marketplaces.

**Example Workflow**:

1. **Register a Name**: Use [BNS One](/bns-community/introduction-to-bns-one/what-is-bns-one.md) to search and register a name like `yourname.btc`.
2. **Renew Ownership**: Receive alerts and renew your name with STX before it expires.
3. **Manage the Name**: Link your Bitcoin address or update metadata for use in apps.
4. **Transfer/Sell the Name**: Use marketplaces like Gamma or directly transfer ownership via a smart contract.

**Why Does This Matter?**

* BNS provides a foundational layer for **Web3 identity** on Bitcoin.
* It simplifies transactions, supports dApp integrations, and enables custom namespaces, making it a cornerstone for Stacks’ growing ecosystem.
