---
title: Delete Trusted Preview Hosts
description: Deletes exact normalized host patterns. Returns 404 if any pattern is not configured. Wildcard coverage does not count as an exact match. The entire request succeeds or fails together.
docs_index: /docs/llms.txt
lastUpdated: 2026-10-22
badge: "DEL"
---

> For an index of all documentation, see [/docs/llms.txt](/docs/llms.txt).

Deletes exact normalized host patterns. Returns 404 if any pattern is not configured. Wildcard coverage does not count as an exact match. The entire request succeeds or fails together.

#### `DELETE /v2/settings/preview-hosts`

## Hostname matching

| Pattern               | Matches                                                                          |
| --------------------- | -------------------------------------------------------------------------------- |
| `preview.example.com` | Only that exact hostname.                                                        |
| `*.example.com`       | Exactly one subdomain level, such as `app.example.com`; not `a.b.example.com`.   |
| `**.example.com`      | One or more subdomain levels, including `app.example.com` and `a.b.example.com`. |

Neither wildcard includes `example.com` itself. Add the root domain as a separate pattern when needed. Wildcards must appear as `*.` or `**.` at the beginning, followed by at least two fixed hostname labels.

Use hostnames only, without a scheme, port, path, user information, query, or fragment. Patterns are normalized to lowercase, and at most 100 can be configured. See [exact hosts and wildcards](/docs/api/v2/guides/accessing-previews#exact-hosts-and-wildcards) for examples and [updating patterns](/docs/api/v2/guides/accessing-previews#update-trusted-hosts) for mutation behavior.

Deletes exact normalized patterns. With only `*.example.com` configured, deleting `app.example.com` returns `404`; wildcard coverage does not count as a configured entry. Removing an exact entry does not stop trusting that hostname if a remaining wildcard still matches it. An empty list or repeated normalized patterns returns `422`. If any requested pattern is missing, nothing is deleted. Success returns `200` with `{ success: true }`.

## Usage

```typescript
import { v0 } from 'v0'

const result = await v0.settings.deletePreviewHosts({
  hosts: ['*.example.com'],
})

console.log(result)
```

```bash
curl -X DELETE "https://api.v0.dev/v2/settings/preview-hosts"   -H "Authorization: Bearer $V0_API_KEY"   -H "Content-Type: application/json"   -d '{"hosts":["*.example.com"]}'
```

## API Signature

### Request

#### Request Body

- `hosts: string[]` Distinct hostname patterns to delete. Provide hostnames only, without scheme, port, path, userinfo, query, or fragment. \*.example.com matches one subdomain label; \*\*.example.com matches one or more. Neither includes the apex. Patterns are canonicalized before comparison.
  - **Minimum items:** 1
  - **Maximum items:** 100

### Response

- `success: 'true'`

---

For a semantic overview of all documentation, see [/docs/sitemap.md](/docs/sitemap.md)

For an index of all available documentation, see [/docs/llms.txt](/docs/llms.txt)

For agent-facing discovery, including API and MCP surfaces, see [/docs/agents.md](/docs/agents.md)