Using Cloudflare domains with Dub

Learn how to use Cloudflare domains for your Dub project

Steven Tey

Written by Steven Tey

If you're using a domain on Cloudflare for your Dub project, you might need to configure a few extra steps to make sure that your domain works properly.

Prerequisites

If you haven't already, you'll need to add your domain to your Dub project. You can learn how to do that here.

Using Cloudflare's Proxy

If you're using Cloudflare's proxy for your custom domain, you'll need to make sure that your SSL/TLS encryption mode is set to "Full" on Cloudflare.

Using Cloudflare's proxy for your custom domain
Using Cloudflare's proxy for your custom domain

You can do that by following these steps:

  1. Go to your Cloudflare dashboard and select your domain.
  2. Click on the SSL/TLS tab on the sidebar menu.
  3. Under Overview, select the Full option.
SSL/TLS encryption mode needs to be set to "Full" on Cloudflare
SSL/TLS encryption mode needs to be set to "Full" on Cloudflare

This will make sure that the traffic to your domain is always encrypted between Cloudflare and Dub. You can learn more about Cloudflare's SSL/TLS encryption modes here.

Using Cloudflare's DNS only (without proxy)

If you're only using Cloudflare's DNS for your custom domain, all you need to do is set your domain's DNS records to point to Dub's servers and make sure that you're using the DNS only option on Cloudflare.

Set your domain's Proxy status to "DNS only" on Cloudflare (greyed out cloud icon)
Set your domain's Proxy status to "DNS only" on Cloudflare (greyed out cloud icon)

This will make sure that the traffic to your domain is not proxied through Cloudflare and is sent directly to Dub. You can learn more about Cloudflare's proxy options here.

Did this answer your question?