AddThisFeature

Domain Verification

Prove an organization controls a domain before unlocking domain-wide powers.

moderate User Accounts

What it adds

A DNS or file-based challenge that verifies domain ownership and gates features like enforced SSO and domain-wide join.

What your agent is told to do

6
  1. 1

    Generate a unique, unguessable token per organization and domain, and verify it via a DNS TXT record or a file served over HTTPS at a fixed path.

  2. 2

    Check the challenge server-side from the app's own infrastructure. A verification the browser performs can be faked.

  3. 3

    Re-check verified domains on a schedule and mark a domain unverified when the evidence disappears, rather than trusting a one-time pass forever.

  4. 4

    Make clear in the UI exactly what verification unlocks — enforced SSO, automatic joining, directory visibility — so the consequence of verifying is not a surprise.

  5. 5

    Do NOT let a verified domain silently absorb existing accounts. Adding existing users to an organization is a separate, consented action.

  6. 6

    Do NOT verify public email domains such as the large consumer mail providers; maintain a blocklist and refuse them outright.

Edge cases it handles

6
  • The same domain claimed by two organizations must resolve deterministically — first verified wins, later claimants are refused with a route to dispute.
  • Apex domains and subdomains are distinct claims. Decide whether verifying an apex covers its subdomains and enforce that consistently.
  • DNS propagation means the first check often fails legitimately — retry on a backoff and let the user re-check manually, rather than invalidating the token.
  • Verification tokens must expire, and re-issuing a token must invalidate the previous one.
  • Internationalised and punycode domains must normalise to one canonical form before comparison, or the same domain verifies twice.
  • Losing verification must not instantly lock users out of an organization with enforced SSO — warn the admins first and define a grace period.

Definition of done

8
  • Ownership is proven by a unique token via DNS TXT or an HTTPS-hosted file.
  • Verification is performed server-side.
  • Verified domains are re-checked periodically and revoked when evidence is gone.
  • A domain can only be verified by one organization at a time, with a documented dispute path.
  • Public consumer email domains are refused.
  • The features a verified domain unlocks are stated before verification, and existing accounts are never absorbed without consent.
  • The feature matches the existing design system.
  • No existing functionality is broken.

Related features

How it works

  1. 1

    Copy the link

    Grab the Markdown instruction URL for this feature.

  2. 2

    Give it to your AI

    Paste it into Claude Code, Cursor, v0, Lovable — whatever you build with.

  3. 3

    It inspects, then implements

    Your agent reads your existing app first, then adds the feature to fit it.

Works with your stack

These instructions are written to adapt. They tell the agent to detect your framework, match your existing design system, and reuse what you already have — rather than assuming a particular stack.

Need it tighter than that? Customize the feature and tell it exactly what you're running.