Skip to main content

SSL/TLS Settings

With the SSL/TLS settings, you can manage the protocol used for users' connections to the site and for the connection between CDN edge servers and the origin server hosting the site. These settings are available for the connection to edge servers and the connection to origin servers.

Connection to Edge Servers​

In this section, you can configure the connection between users and Arvancloud edge servers, and manage certificates and security protocols.

Enabling HTTPS and Managing Certificates​

When you enable this feature, users connect to edge servers over HTTPS.

To enable HTTPS on the domain via API, you can use the following sample request:

curl --location --request PATCH 'https://napi.arvancloud.ir/cdn/4.0/domains/example.com/ssl' \
--header 'authority: napi.arvancloud.ir' \
--header 'accept: application/json, text/plain, */*' \
--header 'authorization: API KEY 1 2 3 4' \
--header 'content-type: application/json' \
--data '{"ssl_status":true}'

To disable it, simply set the ssl_status key to false.

Edge Server Certificates​

Here you can use the free Let's Encrypt certificate (valid for 3 months with automatic renewal), or click Private Certificate to upload your own Certificate and Private Key files.

To upload your custom certificate to the domain via API, you can use the following sample request:

curl --location 'https://napi.arvancloud.ir/cdn/4.0/domains/yourdomain.com/ssl/certificates' \
--header 'authority: napi.arvancloud.ir' \
--header 'accept: application/json, text/plain, */*' \
--header 'authorization: API KEY 1 2 3 4' \
--header 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7ZnkHJORO8lP1SVi' \
--data 'data'

Buy an SSL Certificate​

You can also buy one-year certificates in this section to increase the domain's credibility and security.

HTTPS Settings​

In this section, you can use various features to optimize and manage the security and speed of the secure (HTTPS) connection between the user's browser and Arvancloud edge servers.

Set HTTPS as Default​

When you enable this feature, all HTTP requests are automatically redirected to HTTPS. With the HSTS (HTTP Strict Transport Security) protocol, this is done in the most secure way possible and also prevents possible Man-in-the-Middle attacks.

After you enable this feature and the HSTS setting is cached in users' browsers, changes cannot be applied until the setting expires.

To enable this feature via API, you can use the following sample request:

curl --location --request PATCH 'https://napi.arvancloud.ir/cdn/4.0/domains/example.com/ssl' \
--header 'authority: napi.arvancloud.ir' \
--header 'accept: application/json, text/plain, */*' \
--header 'authorization: API KEY 1 2 3 4' \
--header 'cache-control: no-cache' \
--header 'content-type: application/json' \
--data '{"https_redirect":true}'

To disable it, simply set the https_redirect key to false.

HTTP/3 (with QUIC)​

HTTP/3 is a protocol that speeds up HTTP requests by using QUIC instead of TCP and TLS, providing significant performance improvements. QUIC, which is designed on top of UDP, can increase data transfer speed and reduce network latency. This protocol uses parallel channels to send data, so it can load web pages faster, especially on high-latency networks or unstable connections.

One of the important features of HTTP/3 is its use of TLS 1.3 for encryption, which increases the security of communications and minimizes the risk of Man-in-the-Middle attacks.

To use HTTP/3, besides having a valid TLS 1.3 certificate, HTTPS must be enabled on your domain. That is, your server must be able to support secure communication based on TLS 1.3.

If you use the Arvancloud CDN, you can use its edge server infrastructure to enable HTTP/3.

Upgrade Insecure HTTP Requests​

When you enable this option, the upgrade-insecure-requests header is added to the content so the browser uses the secure version instead of HTTP. This way, all links in HTML and JS files that use the HTTP protocol are automatically replaced with HTTPS links.

To enable this feature via API, you can use the following sample request:

curl --location --request PATCH 'https://napi.arvancloud.ir/cdn/4.0/domains/example.com/ssl' \
--header 'authority: napi.arvancloud.ir' \
--header 'accept: application/json, text/plain, */*' \
--header 'authorization: API KEY 1 2 3 4' \
--header 'cache-control: no-cache' \
--header 'content-type: application/json' \
--data '{"replace_http":true}'

To disable it, simply set the replace_http key to false.

Minimum TLS Version​

HTTPS uses the TLS protocol to secure communication between two points. To guarantee users access to data in the shortest possible time and with the highest security, Arvancloud is one of the global supporters of the TLS 1.3 protocol. Performance improvements in this protocol have not only made it more secure than older versions, but have also reduced latency and significantly increased the speed of access to secure data.

In this section, you can choose the lowest supported TLS version. This way, any user who uses a TLS version lower than the specified version can't view the website over HTTPS.

To enable this feature via API, you can use the following sample request:

curl --location --request PATCH 'https://napi.arvancloud.ir/cdn/4.0/domains/example.com/ssl' \
--header 'authority: napi.arvancloud.ir' \
--header 'accept: application/json, text/plain, */*' \
--header 'authorization: API KEY 1 2 3 4' \
--header 'content-type: application/json' \
--data '{"tls_version":"TLSv1.2"}'

In the tls_version key, set "" for Default and "TLSvx.x" for other TLS versions.

HSTS Protocol​

The main job of this protocol is to securely move the website and all links from HTTP to HTTPS. Most users connect to servers over HTTP by default. When using the secure protocol is mandatory, these requests must be automatically redirected to HTTPS. Using ordinary methods can bring many security risks. HTTP Strict Transport Security, or HSTS for short, is a set of security policies that securely allows websites to be accessible only over HTTPS. A website announces these policies to the user by sending a header named Strict-Transport-Security.

To enable HSTS on the domain via API, you can use the following sample request:

curl --location --request PATCH 'https://napi.arvancloud.ir/cdn/4.0/domains/example.com/ssl' \
--header 'authority: napi.arvancloud.ir' \
--header 'accept: application/json, text/plain, */*' \
--header 'authorization: API KEY 1 2 3 4' \
--header 'content-type: application/json' \
--data '{"hsts_status":true,"hsts_max_age":"2mo","hsts_subdomain":true,"hsts_preload":true}'

In this request, the hsts_status, hsts_subdomian, and hsts_preload keys accept true and false. The hsts_max_age key takes a value in the form "xmo" (where x is the duration you want, which can be 1, 2, 3, 4, 5, 6, 12, or 24).

Using the features in the Arvancloud panel, you can easily enable all advanced features of this protocol, including how long the browser must show the site over HTTPS, applying HSTS to all subdomains, and preparing the domain for submission to search engines. To do this, simply click Change Settings.

Browser Response to HSTS​

After the user sends the first request, the server sends a header like the following, which contains the HSTS policies:

Strict-Transport-Security: max-age=2628000; includeSubDomains;

This means this domain and all its subdomains will be accessible only over HTTPS for the next 2628000 seconds (one month). Here, the browser does two important things:

  • It automatically changes all insecure links to secure links. For example, http://www.arvancloud.ir changes to https://www.arvancloud.ir.
  • If the browser can't verify the link's security, it shows an error message and doesn't allow access to the website.
Google's Solution and Preload​

Imagine a user with a new operating system enters a website's address in the browser for the first time, in an insecure environment. There is a security risk in this very first connection and in receiving the HSTS security policies. For the Chromium project, Google decided to hardcode the names of sites that must always connect over HTTPS. You can also add your website's name to this list. Simply enter your domain on this page. Before doing this, make sure you meet the following conditions:

  • You have a valid certificate.
  • You redirect all HTTP traffic to HTTPS.
  • All subdomains are accessible only over HTTPS.
  • The correct header is sent to users for the settings.

Arvancloud does all of this for you automatically. You only need to submit your domain name to Google. Currently, besides Google Chrome, Firefox, Opera, Safari, and soon Microsoft Internet Explorer also use this Google list.

Browsers That Support HSTS​
  • Google Chrome from version 4.0.211.0
  • Firefox from version 4
  • Internet Explorer 11 and Microsoft Edge (with Windows 10)
  • Opera from version 12
  • Safari since the release of OS X Mavericks in January 2013

JA3 Fingerprint Calculation​

When you enable this feature, clients can be identified based on their SSL/TLS fingerprint, which is useful for traffic analysis and bot detection.

The JA3 Fingerprint guide helps you with this.

Certificate with Support for Older Android Devices​

If you need to support older Android devices, you can select this option so a compatible certificate is issued for them. When you enable this feature, the Arvancloud certificate for your domain is issued as RSA, which is supported on more Android devices than the ECDSA type (the default).

Connection to Origin Servers​

This section determines how Arvancloud edge servers connect to your origin server.

Origin Server Certificates​

To establish a secure connection with the origin server, you need a valid certificate installed on your server. With this feature, you can quickly and easily request, issue, and get a TLS certificate through the Arvancloud panel and manage it on your origin server. You can also revoke the certificate from the panel when needed.

Note that to request a certificate, your domain must be active and have a DNS record compatible with the cloud icon. You can also create 3 free certificates each month.

The guide to getting an origin server certificate helps you with this.

Protocol Between Edge Servers and the Origin Server​

With this option, you can specify how Arvancloud servers connect to your origin server. This connection can be HTTP, HTTPS, or Automatic. To enable the HTTPS or Automatic option, your server needs to support HTTPS.

  • Automatic: The protocol is determined by the same protocol the user used to connect to Arvancloud.
  • HTTP: The connection is always on port 80 and unencrypted.
  • HTTPS: The connection is always secure and on port 443 (requires a certificate on the origin server).

For more precise management, you can also set the protocol of each DNS record separately in DNS Records.

To enable and manage this feature via API, you can use the following sample request:

curl --location --request PATCH 'https://napi.arvancloud.ir/cdn/4.0/domains/example.com/load-balancers/settings' \
--header 'authority: napi.arvancloud.ir' \
--header 'accept: application/json, text/plain, */*' \
--header 'authorization: API KEY 1 2 3 4' \
--header 'Content-Type: text/plain' \
--data '{"protocol":"https"}'

In this request, the protocol key accepts three values: http, https, and auto.