# lol.dids.sites.resolveDomain

> Published by [ngerakines.me](https://lexicon.garden/identity/did:plc:cbkjy5n7bk3ax2wplmtjofq2)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:cbkjy5n7bk3ax2wplmtjofq2/lol.dids.sites.resolveDomain)
- [Documentation](https://lexicon.garden/lexicon/did:plc:cbkjy5n7bk3ax2wplmtjofq2/lol.dids.sites.resolveDomain/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:cbkjy5n7bk3ax2wplmtjofq2/lol.dids.sites.resolveDomain/examples)

## Definitions

### `lol.dids.sites.resolveDomain`

**Type**: `query`

The inverse lookup: which identity and which record serve a domain. Useful for verifying who owns a site.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `domain` | `string` | Yes | The hostname, lowercase IDNA A-label form. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `did` | `string` (did) | Yes | The identity serving the domain. |
| `uri` | `string` (at-uri) | Yes | The serving record; the space form for a space-registered domain. |
| `space` | `string` (at-uri) | No | Present for a space-registered domain. |

#### Errors

- **SiteNotFound**: No active site serves that domain.

## Raw Schema

```json
{
  "id": "lol.dids.sites.resolveDomain",
  "defs": {
    "main": {
      "type": "query",
      "errors": [
        {
          "name": "SiteNotFound",
          "description": "No active site serves that domain."
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "did",
            "uri"
          ],
          "properties": {
            "did": {
              "type": "string",
              "format": "did",
              "description": "The identity serving the domain."
            },
            "uri": {
              "type": "string",
              "format": "at-uri",
              "description": "The serving record; the space form for a space-registered domain."
            },
            "space": {
              "type": "string",
              "format": "at-uri",
              "description": "Present for a space-registered domain."
            }
          }
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "required": [
          "domain"
        ],
        "properties": {
          "domain": {
            "type": "string",
            "maxLength": 253,
            "description": "The hostname, lowercase IDNA A-label form."
          }
        }
      },
      "description": "The inverse lookup: which identity and which record serve a domain. Useful for verifying who owns a site."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
