Give a DID a human-readable name
Bind a short agent name, such as alice, to a hosted DID so that https://<domain>/@alice on your appliance points to it.
Binding a name adds it to the DID document’s alsoKnownAs list and publishes a new signed version of the DID through your VTA. The appliance then answers /@alice with a redirect to the DID. For how updates are published, see DID lifecycle.
A did:webvh identifier is long and hard to share. An agent name gives people and systems a short, memorable address that resolves to the full DID.
Use this guide when:
- You want to share a DID as a short
/@nameaddress. - You need to take a name out of service, bring it back, or give it up.
Prerequisites
- A DID hosted on your appliance. See Create and manage DIDs.
- PNM CLI installed and configured against your VTA, with the
adminrole in the DID’s context.
Step 1. Check the name is free
pnm did-mgmt agent-names check \
--did did:webvh:Q1abc…:did.example.com:my-service \
--name aliceA name is 2 to 63 lowercase letters, digits, or hyphens, starting and ending with a letter or digit, and some names are reserved. Availability is checked on the DID’s domain.
Step 2. Bind the name
pnm did-mgmt agent-names set \
--did did:webvh:Q1abc…:did.example.com:my-service \
--name alicePNM prints Agent name bound. once the new version of the DID is published.
Manage a name
| Task | Command | Effect |
|---|---|---|
| Park a name | pnm did-mgmt agent-names disable --did <did> --name alice | The name stops resolving and is removed from the DID document, but stays reserved to this DID. It appears in list as parked. |
| Bring a parked name back | pnm did-mgmt agent-names enable --did <did> --name alice | The name resolves again. |
| Release a name | pnm did-mgmt agent-names remove --did <did> --name alice | The name is freed for any DID to claim. You can reclaim it later only if it is still free. |
Confirm
Test 1: agent-names list shows the name as resolves
pnm did-mgmt agent-names list \
--did did:webvh:Q1abc…:did.example.com:my-serviceExpected output: the name listed with the state resolves.
Test 2: request to /@alice returns a redirect to the DID
curl -sI "https://did.example.com/@alice"Expected output: HTTP/2 302, with a location header naming the DID. Replace did.example.com with the host of your appliance’s WebVH URL. Browsers are redirected to the DID’s did.jsonl log instead.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
check or set reports the name is taken | Another DID on the same domain holds the name, or holds it parked. | Choose a different name. |
check or set reports the name is reserved | The name is on the appliance’s reserved list. | Choose a different name. |
set fails with agent names require a hosted DID | The DID was not created on a hosting appliance. | Create the DID on your appliance with pnm did-mgmt dids create --server <id>, then bind the name. |
/@alice returns 404 | The name is parked, released, or not yet bound. | Run agent-names list to check the name’s state, and bind or enable it. |
Next steps
- Create and manage DIDs: update or delete the DID the name points to.
- DID lifecycle: where a DID and its names resolve.
Related
- Hosting domains: names are unique per domain.
- Overview: what WebVH Hosting does.
- Create your first hosted DID: publish a DID to name.
Glad to hear it! Please tell us how we can improve more.
Sorry to hear that. Please tell us how we can improve.
Thank you for sharing your feedback so we can improve your experience.