File DA-007 View as Markdown
Claim a domain
Claiming proves you own the domain, so its data shows in your portal, including everything collected since the script went in. You need it after a keyless install, and the portal asks for it as "Verify your domain".
Before you start: you need an account and access to your DNS, your site's HTML or its files.
Steps
- Add the site in the portal, or open the claim link the CLI or install check printed (
https://app.doubleagent.so/claim?domain=…). The portal shows your verify token. - Prove control with one of these:
| Method | Put this | Where |
|---|---|---|
| DNS | TXT record da-verify=<token> | _doubleagent.<host>. On the apex domain it covers subdomains too. |
| Meta tag | <meta name="doubleagent-verification" content="<token>"> | The home page <head> |
| File | da-verify=<token> | https://<host>/.well-known/doubleagent.txt |
| Script | Your site's public key (pk_…) in the snippet | The home page's HTML as served. A tag added later by JavaScript doesn't count. |
- Press Check now in the portal, or run
npx @doubleagent-so/cli verify-domain <host> --method dns. DNS changes can take a few minutes to show up.
Check it worked
The portal shows how many earlier sessions came with the claim, for example "1,284 sessions from before you joined are now yours". The API answers { "verified": true, "claimed": { "sessions": 1284 } }.
What you get, and what changes
Before the claim, Double Agent keeps 30 days of a hostname's data: totals, plus up to 1,000 sessions that were not clearly human. All of it moves to your site when you verify.
After the claim, beacons sent with your key are only accepted from your verified domains. Others get 403 origin_not_allowed. Your test key still works on localhost.
If another site already verified this hostname, the meta tag and script methods can't take it over, because anyone who can publish on the page could plant them. Use DNS or the file method; the others answer 409 transfer_requires_dns_or_file.
Keep the proof in place
Double Agent checks the proof again every day. If a check fails, the domain stays verified for 7 days and its status in Settings › Domains (and status in the API) changes to Verification failing, with the date it started, the date it stops being verified, and what the check found. Owners and admins get one email that day naming the proof, what the check found and the deadline.
Put the proof back and use Check now, or wait for the next daily check. Once a check passes the domain is plain Verified again, and if you got the warning you get a short note saying so. If the proof is still missing after 7 days, the domain is no longer verified and owners and admins get a final email. Your data stays; verify the domain again to get it back.
The "verified by another account" email only goes out when another Double Agent account proves the same domain. A failing proof never sends it.
The meta tag, file and script live on your site, so a redesign or a new site builder can remove them without anyone noticing. A DNS record doesn't change when the site does, and on the apex domain it covers every subdomain. Use DNS where you can.
Don't want the old data? Go to Sites › your site › Settings › Danger zone and use Discard pre-claim data.
Next: see what each screen shows in the portal.