Adding www. subdomain for a custom hostname


I’m working on a Saas platform where we can have multiple customer domains to be mapped into the system. We use the Cloudflare custom hostname API integration to issue new certificates for new customer domains.

Each customer has a domain and we want that domain and the corespondent www. subdomain treated the same way.

We have been using the wildcard: true mode when creating the custom hostname. Everything works fine with the ssl data for each hostname contains the following settings as expected:

“ssl”: {
“type”: “dv”,
“method”: “http”,
“status”: “active”,
“hosts”: [

However, the new rule applied by CA and Cloudflare has prevented us to use the wildcard mode. Hostname created without wildcard enable has only the specified domain name listed in the host field and accessing the “www.” sub-domain resulted in an SSL error.

My question is how can we, at the API level, have an additional host to be listed in the SSL so that the “www.” can be used as it is before?

Is adding another custom hostname for the “www.” the right approach?


This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.