> ## Documentation Index
> Fetch the complete documentation index at: https://gcore-doc-1674.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](/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-1674/sEkrbkGQRkCYopr2/images/docs/cdn/cdn-resource-options/security/set-up-a-redirect-from-http-to-https/mceclip0.png?fit=max&auto=format&n=sEkrbkGQRkCYopr2&q=85&s=e478eb6d59932c572526bd9ea946397e" 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-1674/sEkrbkGQRkCYopr2/images/docs/cdn/cdn-resource-options/security/set-up-a-redirect-from-http-to-https/mceclip1.png?fit=max&auto=format&n=sEkrbkGQRkCYopr2&q=85&s=90e7e07de7d4c213c9d5aaaf9802e1e4" 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.
