> For the complete documentation index, see [llms.txt](https://leather.gitbook.io/guides/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://leather.gitbook.io/guides/bitcoin-name-system-bns/check-bns-name-expiration.md).

# Check BNS name expiration

### Introduction

This guide will help you find out the expiration block for a BNS name so you can renew it on time. The namespace you registered in dictates the frequency with which you have to renew the name. Some examples: in the .id space renewal is required yearly, in the .btc namespace it is required every 5 years and in the .stx namespace the names never expire. This guide is valid for Stacks 2.4.

### Steps to take to check the expiration block

1. Visit [explorer.hiro.so](http://explorer.hiro.so)
2. Click sandbox in the top right
3. Sign in with any address
4. Go to the second tab on the left to get the contract interface for BNS
5. Select the BNS contract<br>

   <figure><img src="/files/I1vxntPPbklJyPy91YWH" alt=""><figcaption><p>The "call a contract" interface of the Hiro Explorer sandbox.</p></figcaption></figure>
6. Select "name-resolve" (read only function)\
   ![](/files/5BJEUTd2HddCk2yibX56)
7. add namespace (id), and name (1), see result by clicking "call function":\
   \&#xNAN;*lease ending at Stacks block 181323*

   <figure><img src="/files/edUNZgCIU68CN7LVbsLG" alt=""><figcaption></figcaption></figure>
8. Check current block height on [explorer.hiro.so](http://explorer.hiro.so):\
   ![](/files/kXN8OmRt65iSTSrv5sSG)\
   181323-130283 = 51040 blocks difference
9. In this case the the domain was recently renewed and is valid for about 50k blocks, which is about a year because we expect about 144 blocks per day.&#x20;


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://leather.gitbook.io/guides/bitcoin-name-system-bns/check-bns-name-expiration.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
