---
title: Domain
summary: >-
  A domain represents the domain name through which visitors will retrieve
  content. There can be multiple domains for a service.
url: https://www.fastly.com/documentation/reference/api/services/domain
---

A domain represents the domain name through which visitors will retrieve content. There can be multiple domains for a service.

## Data model

| Field | Type | Description |
|-------|------|-------------|
| `comment` | string | A freeform descriptive note. |
| `name` | string | The name of the domain or domains associated with this service. |
| `created_at` | string | Date and time in ISO 8601 format. (Read-only) |
| `deleted_at` | string | Date and time in ISO 8601 format. (Read-only) |
| `service_id` | string | Alphanumeric string identifying the service. (Read-only) |
| `updated_at` | string | Date and time in ISO 8601 format. (Read-only) |
| `version` | integer | Integer identifying a service version. (Read-only) |

## API endpoints

### Validate DNS configuration for all domains on a service

**GET** `/service/{service_id}/version/{version_id}/domain/check_all`

Checks the status of all domains' DNS records for a Service Version. Returns an array of 3 items for each domain; the first is the details for the domain, the second is the current CNAME of the domain, and the third is a boolean indicating whether or not it has been properly setup to use Fastly.

**Parameters:**

| Name | Type | In | Required | Description |
|------|------|----|---------|--------------|
| `service_id` | string | path | Yes | Alphanumeric string identifying the service. |
| `version_id` | integer | path | Yes | Integer identifying a service version. |

### Validate DNS configuration for a single domain on a service

**GET** `/service/{service_id}/version/{version_id}/domain/{domain_name}/check`

Checks the status of a specific domain's DNS record for a Service Version. Returns an array in the same format as domain/check_all.

**Parameters:**

| Name | Type | In | Required | Description |
|------|------|----|---------|--------------|
| `domain_name` | string | path | Yes | The name of the domain or domains associated with this service. |
| `service_id` | string | path | Yes | Alphanumeric string identifying the service. |
| `version_id` | integer | path | Yes | Integer identifying a service version. |

### List domains

**GET** `/service/{service_id}/version/{version_id}/domain`

List all the domains for a particular service and version.

**Parameters:**

| Name | Type | In | Required | Description |
|------|------|----|---------|--------------|
| `service_id` | string | path | Yes | Alphanumeric string identifying the service. |
| `version_id` | integer | path | Yes | Integer identifying a service version. |

### Add a domain name to a service

**POST** `/service/{service_id}/version/{version_id}/domain`

Create a domain for a particular service and version.

**Parameters:**

| Name | Type | In | Required | Description |
|------|------|----|---------|--------------|
| `service_id` | string | path | Yes | Alphanumeric string identifying the service. |
| `version_id` | integer | path | Yes | Integer identifying a service version. |

### Describe a domain

**GET** `/service/{service_id}/version/{version_id}/domain/{domain_name}`

Get the domain for a particular service and version.

**Parameters:**

| Name | Type | In | Required | Description |
|------|------|----|---------|--------------|
| `domain_name` | string | path | Yes | The name of the domain or domains associated with this service. |
| `service_id` | string | path | Yes | Alphanumeric string identifying the service. |
| `version_id` | integer | path | Yes | Integer identifying a service version. |

### Update a domain

**PUT** `/service/{service_id}/version/{version_id}/domain/{domain_name}`

Update the domain for a particular service and version.

**Parameters:**

| Name | Type | In | Required | Description |
|------|------|----|---------|--------------|
| `domain_name` | string | path | Yes | The name of the domain or domains associated with this service. |
| `service_id` | string | path | Yes | Alphanumeric string identifying the service. |
| `version_id` | integer | path | Yes | Integer identifying a service version. |

### Remove a domain from a service

**DELETE** `/service/{service_id}/version/{version_id}/domain/{domain_name}`

Delete the domain for a particular service and versions.

**Parameters:**

| Name | Type | In | Required | Description |
|------|------|----|---------|--------------|
| `domain_name` | string | path | Yes | The name of the domain or domains associated with this service. |
| `service_id` | string | path | Yes | Alphanumeric string identifying the service. |
| `version_id` | integer | path | Yes | Integer identifying a service version. |
