Your did.json is your public identity — the file every verifier reads to check your seals. Keeping it current is your responsibility.
Your DID document is a JSON file on your website. It contains your public keys — the keys verifiers use to check your signatures. If it's stale, missing, or out of sync with your local keys, verification fails.
New to this? Sign & Verify explains what the seal does and why it matters. This page is about the housekeeping behind it: keeping the keys published and current.
Whether you use the TrustDID managed dashboard or host everything yourself, the
did.json on your domain is the authoritative source of truth. It's your
responsibility to keep it current — just like keeping your website's TLS certificate or
DNS records up to date. TrustDID provides tools to make this easy.
Your did.json needs to be re-deployed whenever the public keys
change. The common triggers:
TrustDID's dashboard stores your DID and provides a download bundle, API access, and audit logging.
When you rotate keys or add profiles, the updated DID is automatically pushed to the dashboard. You then deploy to your domain.
You still deploy to your website. The dashboard is staging; your domain is production.
You control everything. Your
did.json lives on your web server. TrustDID generates and signs the file locally;
you deploy it manually.
No API dependency. Full sovereignty. But you're responsible for keeping the published file in sync.
For managed-mode users, the TrustDID dashboard is your control centre.
Download a ZIP that mirrors your web server structure:
.well-known/did.json plus any public/{profile}/did.json files.
Extract to your domain root and you're done.
Every change is logged: DID pushes, profile additions, key rotations, bundle downloads. Timestamp, action, and detail for every operation.
Rotate or revoke API tokens from the dashboard. Per-token access control for different machines and automation scripts.
Pull your DID programmatically:
GET /api/business/{id}/.well-known/did.json with a Bearer token. Perfect for
automation scripts.
Run trustdid-setup --push and your
did.json — along with its .vrfy signature and the
.vrfy.log key-history chain — is uploaded to the server in one step. No manual
uploads, no drift.
Choose the approach that fits your team and infrastructure. Ordered from simplest to most automated.
The simplest approach. Download the ZIP from the dashboard, extract it to your web server root.
.well-known/ directory is included)https://yourdomain.ca/.well-known/did.jsonFrequency: whenever you rotate keys or add profiles. Typically a few times per year.
A cron job or Windows Task Scheduler that periodically pulls the latest DID from the TrustDID API and deploys it to your web root. Set it and forget it.
# /etc/cron.d/trustdid-did-sync
0 3 * * * root curl -sS -H "Authorization: Bearer YOUR_TOKEN" \
https://trustdid.ca/api/business/YOUR_ID/.well-known/did.json \
-o /var/www/html/.well-known/did.json
# sync-did.ps1
$headers = @{ "Authorization" = "Bearer YOUR_TOKEN" }
Invoke-WebRequest `
-Uri "https://trustdid.ca/api/business/YOUR_ID/.well-known/did.json" `
-Headers $headers `
-OutFile "C:\inetpub\wwwroot\.well-known\did.json"
# Pull from API and auto-sign
trustdid-setup --pull
trustdid-check after the pull to confirm everything is in sync. You can add it to the
same cron job as a health probe.
Store your did.json in a Git repository.
Changes go through pull requests with review and approval. Merging to main triggers deployment via
your existing CI/CD pipeline.
.well-known/did.json to production# .github/workflows/did-sync.yml
name: Sync DID Document
on:
schedule:
- cron: '0 3 * * *' # daily
workflow_dispatch: # manual trigger
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Pull latest DID
run: |
curl -sS -H "Authorization: Bearer ${{ secrets.TRUSTDID_TOKEN }}" \
https://trustdid.ca/api/business/${{ secrets.TRUSTDID_ID }}/.well-known/did.json \
-o .well-known/did.json
- name: Create PR if changed
uses: peter-evans/create-pull-request@v5
with:
title: "Update DID document"
body: "Auto-synced from TrustDID dashboard"
branch: did-update
This gives you Git history, diff review, approval gates, and automated deployment — the same workflow your team already uses for code.
Configure your web server to proxy
/.well-known/did.json requests to the TrustDID API. Visitors hit your domain, but the
response comes from TrustDID transparently. No manual deployment — changes appear instantly.
location = /.well-known/did.json {
proxy_pass https://trustdid.ca/api/business/YOUR_ID/.well-known/did.json;
proxy_set_header Authorization "Bearer YOUR_TOKEN";
proxy_cache_valid 200 5m;
}
<Location "/.well-known/did.json">
ProxyPass "https://trustdid.ca/api/business/YOUR_ID/.well-known/did.json"
RequestHeader set Authorization "Bearer YOUR_TOKEN"
</Location>
proxy_cache or a local fallback file
as a safety net.
The moment something changes, push it. One command
uploads your did.json — together with its .vrfy signature and the
.vrfy.log key-history chain — to the server. No polling, no waiting for a
scheduled pull.
# Push your identity files in one step
trustdid-setup --push
# Uploads:
# did.json — your DID document
# did.json.vrfy — its signature sidecar
# did.json.vrfy.log — the key-history audit chain
Run it by hand after a rotation, or wire it into the same script that rotates your keys — the push happens in seconds, fully automated. No cron jobs, no polling, no delay.
Because the .vrfy and .vrfy.log travel
with the DID document, verifiers always see a key history that matches the keys you just
published.
Rotations aren't just performed — they're recorded. Alongside the
keyHistory inside your did.json, every rotation appends an entry to a
tamper-evident, append-only sidecar log: did.json.vrfy.log.
scheduled-rotation, key-compromise, key-loss-recovery, policy-change, or initial-setup# Rotate a key, recording why
trustdid-keytool --rotate PROFILE --rotation-reason key-compromise
# Verify the full key-history chain
trustdid-verify --verify-history
Old signatures keep verifying against the key that was active at signing time — the log is what lets a verifier prove which key that was, and that nobody quietly rewrote the past.
A signature is only as durable as the identity behind it. So we make this commitment publicly:
did:web
resolves through the domain it names, so an identity on your own domain outlives its keys only
as long as the domain stays registered and serving. Budget for it the way you budget for
archiving the documents themselves. (Hosted identities sit on our domain, which we keep.)keyHistory, so verifiers can still resolve the key that was active when you signed.Don't wait for a failed verification to discover your DID is out of date.
trustdid-check regularly
Add it to your cron job, CI/CD pipeline, or monitoring system. Exit code 0 = healthy, non-zero = action needed.
# Does my DID resolve?
curl -sS https://yourdomain.ca/.well-known/did.json | jq .id
# Does it match my local copy?
diff <(curl -sS https://yourdomain.ca/.well-known/did.json | jq -S .) \
<(jq -S . ~/.trustdid/did.json)
--regenerate but didn't
push the updated did.json to your website. Every verification now fails because the
published key doesn't match.did.json to the wrong
directory. It needs to be at exactly /.well-known/did.json — not
/did.json or /.well-known/DID.json.Cache-Control: max-age=300 (5 min) for /.well-known/did.json to balance
freshness with performance.--deploy for new machines to
add profiles to the existing org DID.Still have questions? The FAQ covers key rotation, troubleshooting, enterprise deployment, and everything in between — read the FAQ.