# Domain Verification (/docs/getting-started/ownership-verification)





# Domain Verification [#domain-verification]

To ensure security and prevent data spoofing, you must verify ownership of your domain. We offer two methods to verify your site.

## Verification Methods [#verification-methods]

Choose the method that best fits your technical setup.

<Tabs items="['DNS Record', 'Meta Tag']">
  <Tab value="DNS Record">
    <div className="mb-6">
      <h3 className="text-xl font-semibold flex items-center gap-2">
        <Globe className="h-5 w-5 text-primary" />

        DNS TXT Record
      </h3>

      <p className="text-sm text-muted-foreground mt-1">
        Best for domain-level verification without modifying website code.
      </p>
    </div>

    <Steps>
      <Step>
        ### Copy the TXT Record [#copy-the-txt-record]

        Copy the verification token from your dashboard settings ( `Settings` > `API keys`  ):

        ```text
                ucoder-insights-id=YOUR_DOMAIN_VERIFICATION_ID
        ```
      </Step>

      <Step>
        ### Add to DNS Provider [#add-to-dns-provider]

        Log in to your domain registrar (GoDaddy, Namecheap, Cloudflare) and add a new record. Use `_ucoderinsight.insights` as the host — most providers automatically append your domain to it.

        | Type    | Host / Name               | Value                                            | TTL    |
        | :------ | :------------------------ | :----------------------------------------------- | :----- |
        | **TXT** | `_ucoderinsight.insights` | `ucoder-insights-id=YOUR_DOMAIN_VERIFICATION_ID` | `Auto` |
      </Step>

      <Step>
        ### Verify [#verify]

        DNS changes are usually visible within a few minutes, but can take up to a few hours depending on your provider. Click **Verify** once it's propagated. Check DNS propagation using tools like [DNS Checker](https://dnschecker.org/).
      </Step>
    </Steps>
  </Tab>

  <Tab value="Meta Tag">
    <div className="mb-6">
      <h3 className="text-xl font-semibold flex items-center gap-2">
        <Code2 className="h-5 w-5 text-primary" />

        Meta Tag Verification
      </h3>

      <p className="text-sm text-muted-foreground mt-1">
        Easiest for developers. Add a simple tag to your site's head to verify ownership.
      </p>
    </div>

    <Steps>
      <Step>
        ### Copy Meta Tag [#copy-meta-tag]

        Get the code snippet from your dashboard:

        ```html
        <meta name="ucoder-insights-id" content="YOUR_DOMAIN_VERIFICATION_ID" />
        ```
      </Step>

      <Step>
        ### Paste in Head Section [#paste-in-head-section]

        Paste it into the `<head>` section of your `index.html` or `layout.tsx` file (before the closing `</head>` tag).
      </Step>

      <Step>
        ### Verify [#verify-1]

        Deploy your site and click **Verify**.
      </Step>
    </Steps>
  </Tab>
</Tabs>

***

## What happens after verification? [#what-happens-after-verification]

Once verified, you'll see a success badge in your project settings, showing which method was used and when.

<div className="flex items-center gap-3 text-emerald-700 bg-emerald-50 dark:bg-emerald-950/20 dark:text-emerald-400 px-4 py-3 rounded-md border border-emerald-200 dark:border-emerald-900/30 mt-4">
  <CheckCircle2 className="h-6 w-6" />

  <div>
    <p className="font-bold">
      Domain Ownership Verified
    </p>

    <p className="text-sm opacity-90">
      Example: Verified via Meta Tag on Jan 15, 2026, 10:30 AM
    </p>
  </div>
</div>

<Image src="/docs_img/domain.png" alt="Verified Project Status" width="1200" height="675" className="w-full h-auto mt-6 mb-8 border rounded-lg object-cover" />

***

## Understanding the Security Logic [#understanding-the-security-logic]

Why do we enforce domain verification? It's not just a formality — it protects your account quota and data integrity.

### The Data Flow Process [#the-data-flow-process]

Here's how our server decides whether to accept or reject an analytics event:

<div className="grid grid-cols-1 md:grid-cols-2 gap-4 my-6">
  <div className="border rounded-lg p-5 border-emerald-500/20 bg-emerald-500/5">
    <h3 className="flex items-center gap-2 text-lg font-semibold text-emerald-700 dark:text-emerald-400 mb-3">
      <CheckCircle2 className="h-5 w-5" />

      Verified Domain
    </h3>

    <ul className="list-disc pl-5 space-y-2 text-sm text-muted-foreground">
      <li>
        The request 

        `Origin`

         matches your verified list.
      </li>

      <li>
        <strong>Action:</strong>

         Data is accepted and processed.
      </li>

      <li>
        <strong>Result:</strong>

         Analytics appear on your dashboard instantly.
      </li>
    </ul>
  </div>

  <div className="border rounded-lg p-5 border-red-500/20 bg-red-500/5">
    <h3 className="flex items-center gap-2 text-lg font-semibold text-red-700 dark:text-red-400 mb-3">
      <Ban className="h-5 w-5" />

      Unverified Domain
    </h3>

    <ul className="list-disc pl-5 space-y-2 text-sm text-muted-foreground">
      <li>
        The request comes from an unknown source (e.g., a spam site).
      </li>

      <li>
        <strong>Action:</strong>

         Request is blocked immediately (

        `403 Forbidden`

        ).
      </li>

      <li>
        <strong>Result:</strong>

         No data is recorded, protecting your quota.
      </li>
    </ul>
  </div>
</div>

### Why strict verification matters [#why-strict-verification-matters]

Without verification, anyone with your **Public Tracking ID** could send fake data to your dashboard.

<div className="grid grid-cols-1 md:grid-cols-3 gap-4 my-6">
  <div className="flex flex-col gap-2 p-5 border rounded-lg bg-card hover:border-orange-500/50 transition-colors">
    <ShieldAlert className="h-8 w-8 text-orange-500" />

    <h3 className="font-semibold mt-2">
      Prevents Spam
    </h3>

    <p className="text-sm text-muted-foreground">
      Stops bad actors from flooding your dashboard with garbage data.
    </p>
  </div>

  <div className="flex flex-col gap-2 p-5 border rounded-lg bg-card hover:border-blue-500/50 transition-colors">
    <Server className="h-8 w-8 text-blue-500" />

    <h3 className="font-semibold mt-2">
      Saves Quota
    </h3>

    <p className="text-sm text-muted-foreground">
      Ensures your monthly event limit isn't wasted by unauthorized sites.
    </p>
  </div>

  <div className="flex flex-col gap-2 p-5 border rounded-lg bg-card hover:border-purple-500/50 transition-colors">
    <Lock className="h-8 w-8 text-purple-500" />

    <h3 className="font-semibold mt-2">
      Data Integrity
    </h3>

    <p className="text-sm text-muted-foreground">
      Guarantees that 100% of your analytics data comes from real users.
    </p>
  </div>
</div>
