> ## Documentation Index
> Fetch the complete documentation index at: https://gcore-doc-1046.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Set up a redirect from HTTP to HTTPS

**Note** : only one redirect option can be enabled on a CDN resource.

You can redirect HTTP traffic to HTTPS via API (more info in the [API documentation](https://gcore.com/docs/api-reference/cdn/cdn-resources/change-cdn-resource-1)) or in the Gcore Customer Portal.

To enable the redirect option in the Gcore Customer Portal, go to the CDN resource settings:

1\. Get a free Let's Encrypt certificate or add your SSL certificate in the General -> SSL section and save changes. More info in the guide "[Add an SSL certificate to deliver content over HTTPS](/cdn/ssl-certificates/add-an-ssl-certificate-to-deliver-content-over-https)".

<Frame>
  <img src="https://mintcdn.com/gcore-doc-1046/Mbl31qz19VV85OOr/images/docs/cdn/cdn-resource-options/security/set-up-a-redirect-from-http-to-https/mceclip0.png?fit=max&auto=format&n=Mbl31qz19VV85OOr&q=85&s=757d43fc0868c694cce47eacad150303" alt="CDN Resources settings" width="965" height="830" data-path="images/docs/cdn/cdn-resource-options/security/set-up-a-redirect-from-http-to-https/mceclip0.png" />
</Frame>

2\. Go to the "Access" section, enable the "Redirect HTTP to HTTPS" option and save changes.

<Frame>
  <img src="https://mintcdn.com/gcore-doc-1046/Mbl31qz19VV85OOr/images/docs/cdn/cdn-resource-options/security/set-up-a-redirect-from-http-to-https/mceclip1.png?fit=max&auto=format&n=Mbl31qz19VV85OOr&q=85&s=bdf826cd8440225f574a90ac35e6aef9" alt="Access" width="979" height="932" data-path="images/docs/cdn/cdn-resource-options/security/set-up-a-redirect-from-http-to-https/mceclip1.png" />
</Frame>

The error "*You cannot enable redirect HTTP to HTTPS when HTTPS is disabled. Please enable HTTPS and add SSL certificate first* " means that you didn't add a certificate or that the issuing of a Let's Encrypt certificate for your account wasn't completed. As usual it takes about 15 minutes.
