# 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 three 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:

        ```text
        ucoder-site-verification=abc123456789xyz
        ```
      </Step>

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

        Log in to your domain registrar (GoDaddy, Namecheap, Cloudflare) and add a new record:

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

      <Step>
        ### Verify [#verify]

        Wait up to 48 hours for propagation, then click **Verify** in the dashboard.
      </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 for verification 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="abc123456789xyz" />
        ```
      </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 will see a success badge in your settings.

<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">
      Verified via METHOD\_NAME (`meta_tag`, `script`, `DNS`) on DATE & TIME
    </p>
  </div>
</div>

<Image src="https://res.cloudinary.com/dqh01bl7y/image/upload/q_auto/f_auto/v1773111513/api_ishqeu.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 force 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 is 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>
        **Action:**

         Data is accepted and processed.
      </li>

      <li>
        **Result:**

         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>
        **Action:**

         Request is blocked immediately (

        `403 Forbidden`

        ).
      </li>

      <li>
        **Result:**

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

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

Without verification, anyone with your **Project 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 hackers 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>
