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
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.
Use did:web:example.com and publish /.well-known/did.json on the same domain.
Add an explicit page hint with <link rel="did"> or <meta name="did">.
Your site can still point to that DID, including one hosted by qart.app.
example.com.did:web:example.com.https://example.com/.well-known/did.json.This is the cleanest setup and should be the default recommendation.
did:web:example.com
https://example.com/.well-known/did.json
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">
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">
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"]
}
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">
If your website and canonical DID live on different systems, you can also publish:
/.well-known/did-configuration.json
Serve /.well-known/did.json through your host or CDN. Add the DID hint in the theme header or with a header injection plugin.
Use Code Injection for the page head. Serve the DID document through your web server, reverse proxy, or edge layer.
If the platform cannot serve /.well-known, use a proxy or a third-party DID plus a page hint.
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"
}
]
}