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.
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.
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.
-
Log in to the Cloudflare dashboard ↗ and select your account and website.
-
Select SSL/TLS > Custom Hostnames.
-
Select the custom hostname and select Delete.
-
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.
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.