---
title: "Domain Verification & CDN Routing - Serpwise Documentation"
description: "Verify ownership of your domain and route traffic through Serpwise using your CDN or DNS."
url: "https://serpwise.ai/docs/domain-verification/"
source: "https://serpwise.ai/docs/domain-verification/"
---
[Back to Serpwise](/)

Serpwise Documentation

Connect · Configure · Execute

Search documentation

`/`

No documentation found.

↑↓ Navigate Enter to open

Browse documentation

Before Serpwise can proxy traffic for your domain, you need to complete two steps:

1. **Verify ownership** - prove you control the domain
2. **Route traffic** - point your CDN or DNS to the Serpwise gateway

## Step 1: Verify Domain Ownership

Verification prevents unauthorized users from proxying domains they don’t own. Serpwise provides two verification methods.

### Method 1: DNS TXT Record

Add a TXT record to your domain’s DNS configuration. This is the recommended method - it doesn’t require access to your web server.

```
Type:  TXT
Name:  _serpwise-verify.example.com
Value: serpwise-verify=<your-verification-token>
```

Your verification token is shown in the domain setup screen in the Serpwise dashboard. After adding the record, click **Verify** - DNS propagation typically takes 1-5 minutes, though it can take up to 48 hours in some cases.

### Method 2: HTML File

Place a plain text file at a specific path on your web server:

```
URL:     https://www.example.com/.well-known/serpwise-verify.txt
Content: <your-verification-token>
```

The file must:

- Return a `200` HTTP status code
- Contain only the verification token (no extra whitespace or HTML)
- Be publicly accessible without authentication

Once the file is in place, click **Verify** in the dashboard.

* * *

## Step 2: Route Traffic Through Serpwise

After verification, update your CDN or DNS to route traffic through the Serpwise gateway. The method depends on how your site is currently set up.

Your gateway address is your **proxy subdomain**: `{id}.edge.serpwise.ai` - shown in your domain’s overview.

### Option A: Route via CDN (Recommended)

If you use a CDN (Cloudflare, Fastly, CloudFront, etc.), configure it to use Serpwise as its origin:

Cloudflare Generic CDN

1. Go to your Cloudflare zone → **DNS**
2. Update or add an A/CNAME record for your hostname:
   
   ```
   Type:  CNAME
   Name:  www
   Value: abc123.edge.serpwise.ai
   Proxy: DNS only (grey cloud) initially
   ```
3. Under **Rules** → **Origin Rules**, set your origin to your Serpwise proxy subdomain
4. **Do not re-enable Cloudflare proxying (orange cloud)**. Leave it as DNS only.

Configure your CDN’s origin setting to point to your Serpwise proxy subdomain:

```
CDN Origin: abc123.edge.serpwise.ai
Port:       443
Protocol:   HTTPS
Host Header: www.example.com  ← preserve your domain as Host header
```

The `Host` header must pass through as your actual domain name so Serpwise can resolve the correct domain configuration.

### Option B: Direct DNS CNAME

If you don’t use a CDN, point your domain directly to Serpwise:

```
Type:  CNAME
Name:  www.example.com
Value: abc123.edge.serpwise.ai
TTL:   300 (5 minutes - allows quick changes if needed)
```

* * *

## Verifying the Routing

After updating DNS or CDN settings, confirm everything is working:

1. **Dashboard DNS Check** - Go to your domain’s overview and run the DNS Check. It will show the current DNS resolution and confirm whether traffic is routing through Serpwise.
2. **Proxy subdomain test** - Before switching DNS, test using your proxy subdomain directly:
   
   ```
   curl -H "Host: www.example.com" https://abc123.edge.serpwise.ai/
   ```
   
   You should receive the same response your origin serves.
3. **Check response headers** - Serpwise adds an `X-Serpwise-Cache` header to responses. If you see this header, traffic is flowing through the gateway correctly.

* * *

## Troubleshooting

### Verification fails immediately

- Wait a few minutes for DNS propagation and try again
- Use a tool like [dnschecker.org](https://dnschecker.org) to confirm the TXT record is visible globally
- For HTML file verification, check the file is accessible from a different network (not cached on your local machine)

### Gateway returns errors after routing

- Use **Test Connection** in the domain overview to check the gateway can reach your origin
- Verify the origin host and port settings are correct
- If your origin requires a specific `Host` header, ensure your CDN is forwarding it correctly

### My CDN is caching unmodified pages

- Ensure your CDN cache key includes the full URL path
- Serpwise modifies the HTML response - if your CDN is serving stale cached pages, the modifications won’t be visible until the cache expires
- Configure cache bypass rules for HTML content types in your CDN if needed