---
title: Apex redirect
summary: Supports redirecting traffic for apex domains, subdomains, or wildcard domains to a WWW subdomain.
url: https://www.fastly.com/documentation/reference/api/vcl-services/apex-redirect
---

Supports redirecting traffic for apex domains, subdomains, or wildcard domains to a WWW subdomain.

## Data model

| Field | Type | Description |
|-------|------|-------------|
| `created_at` | string | Date and time in ISO 8601 format. (Read-only) |
| `deleted_at` | string | Date and time in ISO 8601 format. (Read-only) |
| `domains` | array | Array of apex domains that should redirect to their WWW subdomain. |
| `feature_revision` | integer | Revision number of the apex redirect feature implementation. Defaults to the most recent revision. |
| `service_id` | string | Alphanumeric string identifying the service. (Read-only) |
| `status_code` | integer | HTTP status code used to redirect the client. |
| `updated_at` | string | Date and time in ISO 8601 format. (Read-only) |
| `version` | integer | Integer identifying a service version. (Read-only) |

## API endpoints

### List apex redirects

**GET** `/service/{service_id}/version/{version_id}/apex-redirects`

List all apex redirects 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. |

### Create an apex redirect

**POST** `/service/{service_id}/version/{version_id}/apex-redirects`

Create an apex redirect 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. |

### Get an apex redirect

**GET** `/apex-redirects/{apex_redirect_id}`

Get an apex redirect by its ID.

**Parameters:**

| Name | Type | In | Required | Description |
|------|------|----|---------|--------------|
| `apex_redirect_id` | string | path | Yes |  |

### Update an apex redirect

**PUT** `/apex-redirects/{apex_redirect_id}`

Update an apex redirect by its ID.

**Parameters:**

| Name | Type | In | Required | Description |
|------|------|----|---------|--------------|
| `apex_redirect_id` | string | path | Yes |  |

### Delete an apex redirect

**DELETE** `/apex-redirects/{apex_redirect_id}`

Delete an apex redirect by its ID.

**Parameters:**

| Name | Type | In | Required | Description |
|------|------|----|---------|--------------|
| `apex_redirect_id` | string | path | Yes |  |

