---
title: "Domains"
description: "<p>Launch Domains let you connect custom domains to an environment, manage apex-domain redirection and SSL certificates (automatic or your own), and verify the DNS records needed to bring each domain live.</p>"
url: "https://www.contentstack.com/docs/developers/apis/launch-api/domains"
product: "Contentstack"
doc_type: "guide"
audience:
  - developers
  - admins
version: "current"
last_updated: "2026-01-13"
---

# Domains

Launch Domains let you connect custom domains to an environment, manage apex-domain redirection and SSL certificates (automatic or your own), and verify the DNS records needed to bring each domain live.

## Get all Domains

### Get all Domains

**GET** `/projects/{project_uid}/environments/{environment_uid}/domains`

The Get all Domains request fetches the list of all domains in an environment of your project, including each domain's current status and the DNS records needed to verify it.

#### URL Parameters

- **environment_uid** (required)
  Enter the environment\_uid of the environment.
- **project_uid** (required)
  Enter the project\_uid of the project.

#### Query Parameters

- **limit** (optional)
  The "limit" parameter will return a specific number of domains (in between 1-100) in your response based on the value you provide. If there are 20 domains and you want to fetch only 10 domains, set the limit as 10.
- **skip** (optional)
  The "skip" parameter will skip a specific number of domains in the output. For example, if there are 20 domains and you want to skip the first 2 to get only the last 18 in the response body, you need to specify "2" here.

#### Headers

- **authorization** (optional)
  Use a bearer token to authenticate if you're not using the authtoken header. Format: Bearer <token>. If provided, the organization\_uid header isn't required.
- **authtoken** (optional)
  Use an authentication token if the Authorization header isn't provided. \*\*Requires the organization\_uid header.\*\* When using authtoken authentication, you must explicitly provide the organization\_uid header. The organization\_uid cannot be derived from project\_uid for Launch REST APIs.
- **x-cs-api-version** (optional)
  Enter the API version. Default is 1.0
- **organization_uid** (optional)
  ⚠️ \*\*REQUIRED when using authtoken authentication\*\* - you must explicitly provide this header. Optional with Authorization Bearer token (organization\_uid can be derived from the token).

#### Sample Response

```json
{
  "pagination": {
    "count": 1,
    "limit": 10,
    "skip": 0
  },
  "domains": [
    {
      "uid": "690xxxxxxxxxxxxxx95f",
      "url": "www.mysite.com",
      "isCustomDomain": true,
      "redirectToDomain": null,
      "redirectionStatusCode": null,
      "sslMethod": "AUTOMATIC",
      "customCertificateExpiresAt": null,
      "createdAt": "2025-11-06T07:39:19.230Z",
      "updatedAt": "2025-11-06T07:39:53.582Z",
      "domainInfo": {
        "status": "pending",
        "sslStatus": "pending_validation",
        "hostnameVerificationRecord": {
          "txt_name": "_cf-custom-hostname.www.mysite.com",
          "txt_value": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
        },
        "sslValidationRecord": {
          "dcv_name": "_acme-challenge.www.mysite.com",
          "dcv_value": "www.mysite.com.xxxxxxxxxxxx.dcv.cloudflare.com"
        },
        "hostnameVerificationStatus": "not_propagated",
        "sslValidationStatus": "not_propagated"
      }
    }
  ]
}
```

## Update a Domain

### Update a Domain

**PUT** `/projects/{project_uid}/environments/{environment_uid}/domains/{domain_uid}`

The Update a Domain request updates a domain in an environment of your project, including uploading or renewing its custom SSL certificate. Send the domain's current url (from Get all Domains) unless you intend to rename it. To upload a certificate, set sslMethod to CUSTOM and provide customCertificate and customPrivateKey, plus intermediateCertificates if the chain is not already included in customCertificate; the certificate fields are ignored unless sslMethod is set. If sslMethod is omitted, the domain's existing SSL configuration is left unchanged. Renaming a domain that uses a custom certificate requires providing the certificate again.  
  

##### Rename a domain:

```
{
  "url": "www.updated-mysite.com"
}
```

undefined

#### URL Parameters

- **domain_uid** (required)
  Enter the uid of the domain.
- **environment_uid** (required)
  Enter the environment\_uid of the environment.
- **project_uid** (required)
  Enter the project\_uid of the project.

#### Headers

- **authorization** (optional)
  Use a bearer token to authenticate if you're not using the authtoken header. Format: Bearer <token>. If provided, the organization\_uid header isn't required.
- **authtoken** (optional)
  Use an authentication token if the Authorization header isn't provided. \*\*Requires the organization\_uid header.\*\* When using authtoken authentication, you must explicitly provide the organization\_uid header. The organization\_uid cannot be derived from project\_uid for Launch REST APIs.
- **x-cs-api-version** (optional)
  Enter the API version. Default is 1.0
- **organization_uid** (optional)
  ⚠️ \*\*REQUIRED when using authtoken authentication\*\* - you must explicitly provide this header. Optional with Authorization Bearer token (organization\_uid can be derived from the token).

#### Sample Response

```json
{
  "domain": {
    "uid": "690xxxxxxxxxxxxxx95f",
    "url": "www.updated-mysite.com",
    "isCustomDomain": true,
    "redirectToDomain": null,
    "redirectionStatusCode": null,
    "sslMethod": "AUTOMATIC",
    "customCertificateExpiresAt": null,
    "createdAt": "2025-11-06T07:39:19.230Z",
    "updatedAt": "2025-11-06T07:39:53.582Z"
  }
}
```