# Resolve Domains

Resolving a domain involves finding its corresponding owner wallet address. Learn more about SNS resolution methodology and the steps involved to finally resolve an address from a domain here: [On-Chain Resolution](/dev/on-chain-resolution.md). \ <br>

{% tabs %}
{% tab title="web3.js v1" %}

```typescript
import { resolve } from "@bonfida/spl-name-service";

const domain = "bonfida.sol" // With or without .sol

// The config argument to resolve is optional
// If allowPDA is true, a list of program IDs is required
const resolveConfig = { allowPDA: true, programIds: ["..."] }

// Final argument is optional
const resolvedAddress = await resolve(connection, domain, resolveConfig)
```

{% endtab %}

{% tab title="web3.js v2 (@solana/kit)" %}

```typescript
import { resolveDomain } from "@solana-name-service/sns-sdk-kit";

const domain = "sns.sol" // With or without .sol

// The options argument is not required to be passed
// If allowPDA is true, a list of program IDs is required.
const resolveOptions = { allowPda: true, programIds: ["..."] }

const resolvedAddress = await resolveDomain({ rpc, domain, options:resolveOptions });
```

{% endtab %}
{% endtabs %}


---

# 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://docs.sns.id/dev/sns-sdk/editor.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.
