Cloudflare Docs
Cloudflare for Platforms
Cloudflare for Platforms
Edit this page
Give us feedback
Set theme to dark (⇧+D)

Remove custom hostnames

As a SaaS provider, your customers may decide to no longer participate in your service offering. If that happens, you need to stop routing traffic through those custom hostnames.

​​ Domains using Cloudflare

If your customer’s domain is also using Cloudflare, they can stop routing their traffic through your custom hostname by updating their Cloudflare DNS.

If they update their CNAME record so that it no longer points to your CNAME target:

  • The domain’s traffic will not route through your custom hostname.
  • The custom hostname will enter into a Moved state.

If the custom hostname is in a Moved state for seven days, it will transition into a Deleted state.

​​ Domains not using Cloudflare

If your customer’s domain is not using Cloudflare, you must remove a customer’s custom hostname from your zone if they decide to churn.

This is especially important if your end customers are using Cloudflare because if the custom hostname changes the DNS target to point away from your SaaS zone, the custom hostname will continue to route to your service. This is a result of the custom hostname priority logic.

  1. Log in to the Cloudflare dashboard and select your account and website.

  2. Select SSL/TLS > Custom Hostnames.

  3. Select the custom hostname and select Delete.

  4. A confirmation window will appear. Acknowledge the warning and select Delete again.

To delete a custom hostname and any issued certificates using the API, send a DELETE request.

​​ For end customers

If your SaaS domain is also a domain using Cloudflare, you can use your Cloudflare DNS to remove your domain from your SaaS provider.

This means that - if you remove the DNS records pointing to your SaaS provider - Cloudflare will stop routing domain traffic through your SaaS provider and the associated custom hostname will enter a Moved state.

This also means that you need to keep DNS records pointing to your SaaS provider for as long as you are a customer. Otherwise, you could accidentally remove your domain from their services.