WeDID Guide

Publish a DID for your website

The goal is simple: someone visits your domain, and the browser can resolve your identity without asking them for a URL, path, or manual DID input.

Best default

Use did:web:example.com and publish /.well-known/did.json on the same domain.

If the DID has a path

Add an explicit page hint with <link rel="did"> or <meta name="did">.

If a third party hosts it

Your site can still point to that DID, including one hosted by qart.app.

What WeDID checks

  1. 1. Read the current host, such as example.com.
  2. 2. Derive did:web:example.com.
  3. 3. Fetch https://example.com/.well-known/did.json.
  4. 4. Verify that the returned document ID matches the derived DID.
  5. 5. If no root-domain DID is found, look for explicit page hints.

Root-domain DID

This is the cleanest setup and should be the default recommendation.

did:web:example.com
https://example.com/.well-known/did.json

Path-based DID

Use this for profiles, merchants, creators, or user-owned spaces under a shared domain.

did:web:example.com:users:alice
<link rel="did" href="did:web:example.com:users:alice">

Third-party DID

When another service is the source of truth, point to that DID from your own site.

did:web:qart.app:users:fresh-farms
<meta name="did" content="did:web:qart.app:users:fresh-farms">

Minimal did.json

If your domain hosts its own DID, this is the main file that matters:

{
  "@context": ["https://www.w3.org/ns/did/v1"],
  "id": "did:web:example.com",
  "verificationMethod": [
    {
      "id": "did:web:example.com#key-1",
      "type": "JsonWebKey2020",
      "controller": "did:web:example.com",
      "publicKeyJwk": {
        "kty": "EC",
        "crv": "P-256",
        "x": "YOUR_X_COORDINATE",
        "y": "YOUR_Y_COORDINATE"
      }
    }
  ],
  "authentication": ["did:web:example.com#key-1"],
  "assertionMethod": ["did:web:example.com#key-1"]
}

Plain HTML

If your DID is path-based or third-party hosted, add one explicit hint in the page head:

<link rel="did" href="did:web:qart.app:users:fresh-farms">

Stronger linkage

If your website and canonical DID live on different systems, you can also publish:

/.well-known/did-configuration.json

CMS notes

WordPress

Serve /.well-known/did.json through your host or CDN. Add the DID hint in the theme header or with a header injection plugin.

Ghost

Use Code Injection for the page head. Serve the DID document through your web server, reverse proxy, or edge layer.

Hosted builders

If the platform cannot serve /.well-known, use a proxy or a third-party DID plus a page hint.

Qart example

Your public site can live on one domain while Qart hosts the DID and commerce endpoint.

{
  "id": "did:web:qart.app:users:fresh-farms",
  "service": [
    {
      "id": "did:web:qart.app:users:fresh-farms#qart",
      "type": "QartSpace",
      "serviceEndpoint": "https://qart.app/api/v1/commerce/fresh-farms"
    }
  ]
}