# Custom domains on CI/CD pipelines

##### Prerequisites

<span style="background-color: rgb(255, 255, 255); color: rgb(224, 62, 45);">If the firewall is enabled on your service, ensure that **port 80 is open**. This is required for SSL certificate creation and renewal.</span>

---

##### Accessing the Configuration

1. 1. Go to the **Overview** tab of your pipeline dashboard.
    2. Locate the **Custom Domain Names** section inside the **Domain Management** tab.
    3. Click **Manage Domains**.

[![image.png](https://docs.elest.io/uploads/images/gallery/2026-04/scaled-1680-/cdeimage.png)](https://docs.elest.io/uploads/images/gallery/2026-04/cdeimage.png)

In this section, you will have two ways to configure custom domains.

---

##### **Method 1: Manual DNS Setup**

[![image.png](https://docs.elest.io/uploads/images/gallery/2026-04/scaled-1680-/wWximage.png)](https://docs.elest.io/uploads/images/gallery/2026-04/wWximage.png)

1. In this step, enter your domain and press **Enter** to add it to the list of authorized domains.
2. Configure DNS records in your domain registrar panel.

**Required DNS Records**

- **A record**:  
    `@` → `<service IPv4>`  
    (Points the root domain to your service IP)
- **CNAME record**:  
    `www` → `<service CNAME>`  
    *(Recommended remains stable even if your IP changes, e.g., after migration.)*

3. Verify DNS propagation using a tool like: [https://dnschecker.org/](https://dnschecker.org/)

Once propagation is complete, the SSL certificate will be **automatically generated and renewed**, and HTTPS will start working.

---

##### **Method 2: One-Click DNS Setup via Cloudflare (Domain Connect)**

A **One-click DNS Setup** section is available if the domain name server or registrar is Cloudflare, allowing automatic DNS configuration via the Domain Connect protocol.

[![image.png](https://docs.elest.io/uploads/images/gallery/2026-04/scaled-1680-/q54image.png)](https://docs.elest.io/uploads/images/gallery/2026-04/q54image.png)

##### Steps

1. Enter your domain (e.g. `example.com`).
2. Click **Connect Domain**.
3. This action will redirect you to the Cloudflare dashboard for accepting the DNS record configuration.

---

##### **Cloudflare Reverse Proxy Users**

If you are using method 1 and want Cloudflare with the proxy enabled (orange cloud icon), refer to the detailed guide:

[https://docs.elest.io/books/security/page/using-cloudflare](https://docs.elest.io/books/security/page/using-cloudflare)

---

##### **Environment Variable Update**

Some applications require updating an environment variable to reflect the configured domain.

To update:

1. Go to the **Overview** page of your pipeline.
2. Click the **Build &amp; Deploy** tab.
3. Open the **Environment variable** section.
4. Update the domain-related environment variable.

---

##### **Troubleshooting: SSL Not Generated**

**View Nginx Logs**

You can inspect logs using a terminal command:

```
cd /opt/elestio/nginx;
docker-compose logs -f;
```

Press `Ctrl + C` to stop live log output.

---

##### **Reset SSL Data Folder**

In some cases, the SSL data directory **/opt/elestio/nginx/ssl\_data** may become corrupted:

To fix:

1. Connect to your service via terminal.
2. Run the command below.

```
cd /opt/elestio/nginx/;
docker-compose down;
mv ./ssl_data/ ./ssl_data_old/;
mkdir ./ssl_data/;
chmod 777 ./ssl_data/;
docker-compose up -d
```

Once executed, just open your custom website URL again; your certificate should be generated, and your site served over SSL/TLS.

<p class="callout info">We recommend using CNAME records instead of A records; that way, if you later decide to move your pipeline in 1 click from our UI, it will work right away. If you used an A record, you will have to go back to your registrar to update the A record to point to the new IP address.</p>