1. Help Center
  2. Technical
  3. ➕ Securing your Foleon Docs

How to set up your custom domain and SSL/TLS with Cloudflare

Every Foleon Doc needs to live on its own URL, and you can choose to host it on your own custom domain with Cloudflare. Next to that, you can secure the custom domain within Cloudflare with an SSL/TLS certificate. This article shows you how to set up your custom domain and SSL/TLS certificate when using Cloudflare.

⚠️ The recommended option is to let Foleon secure your custom domain. Learn more about how we generate a Let’s Encrypt certificate (for free) and automatically renew it.

 

 

Step 1 — Choose a domain name

Choose the relevant domain name that you control in Cloudflare. In the example below, we're working with the domain whypaper.com. Click on the domain.

6396fe3e22050

 

Step 2 — Create the DNS record

When on the page for your custom domain, navigate to the DNS tab. Click on Add record. In the Name field, fill in the custom domain — in our example whypaper.com.

In the Target field, fill in s1.foleon.com to make sure it points to our servers. Enable Proxied by clicking on the toggle below the Proxy status field. This protects origin servers from DDoS attacks by hiding their IP addresses — among other benefits.

6396fe3fbb60b

Once you've filled in the required fields as illustrated in the screenshot below, click on Save.

 

6396fe41cdb0a

Step 3 — Set your SSL/TLS encryption

Next, navigate to the SSL/TLS tab. In the Overview window, select Full (strict) as the encryption mode. Cloudflare will then enforce the most stringent requirements for origin certificates.

6396fe42efc99


Step 4 — Download the origin certificate

In the SSL/TLS tab, go to Origin Server. Click on Create Certificate.

6396fe44a1a71

Generate private key and CSR with Cloudfare is selected by default, which is the correct option.

 

6396fe46238f2

In the Hostnames field, you list the hostnames on your origin server that the certificate should protect. In the example below, we filled in the subdomain example.whypaper.com. You can also choose to fill in a wildcard such as *.whypaper.com.

6396fe47caac3

Choose how long before your certificate expires. By default, your certificate will be valid for fifteen (15) years.

Click on Create. This leads you to the Origin Certificate Installation window.

6396fe4911fbb

Copy the complete Origin Certificate and Private Key codes.


Step 5 — Create a new custom domain

In the Foleon Dashboard, click account in the left sidebar and go to domains. Click + new domain to get started.

Alternatively, you can go to the project you'd like to set up the custom domain for. In project settings, scroll down to your domain setup to create a new custom domain from there. 

💡Configuring a new domain used to only be possible in the project settings

 

Screenshot 2023-05-16 at 11.04.58 (1)

Did you decide on a domain name? Type it in the field and click next

Screenshot 2023-05-16 at 11.05.24 (1)

Next, make sure you check the reverse proxy box. This step is essential for a successful setup. Learn more in our article Use a reverse proxy for your custom domain.

Screenshot 2023-05-16 at 11.07.38

When you go through the custom domain setup, the third step covers the SSL/TLS certificate.

Because you've selected the reverse proxy checkbox, you can only manually configure your SSL/TLS certificate.

6396fe4d9afbe

In the SSL/TLS Configuration pop-up, you will see three fields: CertificatePrivate key, and Intermediates.

6396fe4ecacda

Paste the Origin Certificate and Private Key codes in the matching fields. Click Save. After correctly inserting your SSL/TLS certificate codes, you’ll see a success message in the project settings.

Once you've taken these steps, click Save to initiate this new setup to close the project settings.

💡 If you set up SSL/TLS with Cloudflare, you don't need to insert anything in the intermediates field.

 

Step 6 — Test your setup

That's it. If nothing is published yet, publish a Foleon Doc in the project and check the domain setup and certificate in the browser.