> ## Documentation Index
> Fetch the complete documentation index at: https://gcore.com/docs/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/dxycBbQXMfI-sCbi/images/docs/cdn/cdn-resource-options/security/set-up-a-redirect-from-http-to-https/mceclip0.png?fit=max&auto=format&n=dxycBbQXMfI-sCbi&q=85&s=5a9ac138886761a76608510334d7748a" 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/dxycBbQXMfI-sCbi/images/docs/cdn/cdn-resource-options/security/set-up-a-redirect-from-http-to-https/mceclip1.png?fit=max&auto=format&n=dxycBbQXMfI-sCbi&q=85&s=e25ba2d04d189d138cb2e7277be3792b" 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.
