---
title: "SSL in WordPress Studio"
description: "WordPress Studio includes support for HTTPS, allowing you to create sites with secure connections that more closely resemble production environments."
sidebar:
  label: "SSL and custom domains"
---

WordPress Studio includes support for HTTPS, allowing you to create sites with secure connections that more closely resemble production environments. This feature makes your local development experience more realistic and helps identify potential issues that might only occur with HTTPS.

## Overview

The SSL support feature in WordPress Studio enables:

-   Creating sites with HTTPS enabled
-   Using custom domains with proper SSL certificates
-   Automatic certificate management
-   Browser compatibility without security warnings (when trusted)

## How it works

WordPress Studio implements SSL support through the following components:

-   **Certificate Authority (CA)**: WordPress Studio creates its own Certificate Authority that signs certificates for your local sites.
-   **Domain Certificates**: Each site with HTTPS enabled receives its own certificate signed by the CA.
-   **Certificate Trust**: The system helps you trust the certificate on your operating system.
-   **HTTPS Redirection**: Traffic is automatically redirected from HTTP to HTTPS for sites with SSL enabled.

## Enabling HTTPS for a site

Note that HTTPS requires a custom domain, as it cannot be used with the default localhost address.

To enable HTTPS for a new or existing site:

1.  Start by creating a new site, or open an existing site’s settings: choose **Settings** from the site menu (click the **Site menu** button, which shows the site’s name, at the top left of the site’s header, or right-click the site in the sidebar).
2.  If creating a new site, click **Advanced** and enter a domain name (must end with `.local`) under **Domain name**.
3.  In an existing site’s settings, turn on **Use custom domain** under **Local domain**, and enter a domain name (must end with `.local`) or use the automatically generated one.
4.  Turn on **HTTPS** next to the domain name when creating a site, or **Enable HTTPS** in an existing site’s settings.

![The Add site form in WordPress Studio with Advanced expanded, showing a .local Domain name and the HTTPS switch turned on.](/wp-content/uploads/docs/create-site-https-1.webp)

5.  Click **Add site** or **Save**, depending on whether you are creating a new site or editing an existing one. 
6.  When prompted, give your permission for WordPress Studio to modify the system hosts file. WordPress Studio will configure everything else automatically. 
7.  For HTTPS connections, a root certificate authority will be generated and installed. Until your computer trusts it, the **Enable HTTPS** option shows a button to fix that: **Show certificate** on macOS, which opens the certificate file in Finder, or **Trust certificate** on Windows and Linux, which trusts it for you. On macOS, you’ll need to manually install the certificate to avoid browser warnings. [Refer to the guide below for more details](#macos).
8.  Navigate to your site using the custom domain.

## Certificate Trust by platform

### Windows

On Windows, WordPress Studio automatically adds the CA to your system trust store. This process requires administrator privileges, so you may see a User Account Control (UAC) prompt when enabling HTTPS. If browsers still warn about your site, click **Trust certificate** under **Enable HTTPS** in the site’s settings.

### MacOS

On macOS, you need to manually trust the CA. To do this, find the certificate file that WordPress Studio automatically installs on your system. You can click **Show certificate** under **Enable HTTPS** in the site’s settings to open its folder in Finder and skip step 1, or:

1.  Open a terminal and run the following command: `open ~/.studio/certificates/`
2.  This will open the folder containing the certificate file (`studio-ca.crt`). Double-click the file to install the certificate and automatically open the **Keychain Access** tool on your machine.
3.  Locate the **WordPress Studio CA** certificate. You can filter the items by the word `studio`.

![A screenshot depicting the Keychain Access application on a Mac and the WordPress Studio CA certificate.](/wp-content/uploads/docs/ssl-keychain.webp)

4.  Double-click the certificate and expand the **Trust** section.
5.  Set “**Secure Sockets Layer(SSL)**” to “**Always Trust**.” You can leave all other settings the same.

![A screenshot depicting the Keychain Access application on a Mac and how to set the SSL setting to "Always Trust" on the WordPress Studio CA certificate.](/wp-content/uploads/docs/ssl-certificate-always-trust.webp)

6.  Close the dialog and enter your password to confirm.

Once the certificate is trusted, your browser will recognize it and indicate that your HTTPS sites are secure.

### Linux

On Linux, WordPress Studio automatically imports the root certificate authority (CA) into the system bundle, Chromium-family user NSS databases, and existing Firefox profile NSS databases (apt, Snap, and Flatpak installs) when you click **Trust certificate**. Most users will not need the steps below.

Use this fallback only if auto-trust didn’t take effect.

#### Firefox (GUI)

1.  Open `about:preferences#privacy`.
2.  Scroll to **Certificates** and click **View Certificates…**.
3.  Switch to the **Authorities** tab and click **Import…**.
4.  Select `~/.studio/certificates/studio-ca.crt`.
5.  Check **Trust this CA to identify websites** and click **OK**.

![Firefox's Downloading Certificate dialog asking whether to trust "WordPress Studio CA", with "Trust this CA to identify websites" checked.](/wp-content/uploads/docs/firefox-trust-ca.webp)

6.  Fully quit and relaunch Firefox.

#### Chromium / Chrome / Brave / Edge (CLI)

Install `certutil` if it isn’t already available:

```shell
sudo apt install libnss3-tools
```

Import the CA into the user NSS database:

```shell
certutil -d sql:$HOME/.pki/nssdb -A -t 'C,,' -n 'WordPress Studio CA' -i ~/.studio/certificates/studio-ca.crt
```

For Snap-Chromium, use the Snap-specific NSS database path instead:

```shell
certutil -d sql:$HOME/snap/chromium/current/.pki/nssdb -A -t 'C,,' -n 'WordPress Studio CA' -i ~/.studio/certificates/studio-ca.crt
```

Fully quit and relaunch the browser after import.

## Troubleshooting

### Browser security warnings

If you see browser security warnings when visiting your HTTPS-enabled site:

-   Ensure you’ve trusted the **WordPress Studio CA** certificate on your system.
-   Restart your browser after trusting the certificate.
-   Clear your browser cache if warnings persist.
