# Custom hostnames on cloudflare SAAS

**URL:** <https://community.fly.io/t/custom-hostnames-on-cloudflare-saas/20650>\
**Category:** General\
**Tags:** login-only\
**Created:** [July 1, 2024, 5:20pm UTC](https://community.fly.io/t/custom-hostnames-on-cloudflare-saas/20650 "2024-07-01T17:20:13Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![pier](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/pier/32/74_2.png) [@pier](https://community.fly.io/u/pier)\
**Post date:** [July 1, 2024, 8:34pm UTC](https://community.fly.io/t/custom-hostnames-on-cloudflare-saas/20650/2 "2024-07-01T20:34:42Z")

</div>

Hey

I’m not sure if this will work with the hostname for SAAS feature…

Cloudflare can generate a certifcate so that the communication between your Fly app and Cloudflare will be encrypted with no random 525 errors.

I wrote a little tutorial here:

> [@Cloudflare 525 error randomly occurs](https://community.fly.io/t/cloudflare-525-error-randomly-occurs/1798/19):
>
> I got it running, thanks everyone for your help. These are the exact steps I took: 1 Add your domain to Cloudflare CF will not give an origin cert for a domain that they do not control. You won’t be able to do this for your Fly dev domain (eg: your-app.fly.dev). Add the domain to CF, change the NS in your registrar’s dashboard, and wait until the NS have propagated. 2 Configure the DNS to point to your Fly app You will need to add A records so that your domain or subdomain point to your Fly a…

---

_[View the full topic](https://community.fly.io/t/custom-hostnames-on-cloudflare-saas/20650)._
