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.
In this article
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.
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.
Once you've filled in the required fields as illustrated in the screenshot below, click on Save.
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.
Step 4 — Download the origin certificate
In the SSL/TLS tab, go to Origin Server. Click on Create Certificate.
Generate private key and CSR with Cloudfare is selected by default, which is the correct option.
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.
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.
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.
Did you decide on a domain name? Type it in the field and click next.
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.
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.
In the SSL/TLS Configuration pop-up, you will see three fields: Certificate, Private key, and Intermediates.
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.