Cloudflare Docs
Cloudflare for Platforms
Cloudflare for Platforms
Visit Cloudflare for Platforms on GitHub
Set theme to dark (⇧+D)

Custom hostnames


​​ Success codes

EndpointMethodCode
/v4/zones/:zone_id/custom_hostnamesPOST201 Created
/v4/zones/:zone_id/custom_hostnames/:custom_hostname_idGET200 OK
/v4/zones/:zone_id/custom_hostnamesGET200 OK
/v4/zones/:zone_id/custom_hostnames/:custom_hostname_idDELETE200 OK
/v4/zones/:zone_id/custom_hostnames/:custom_hostname_idPATCH202 Accepted

​​ Error codes

HTTP Status CodeAPI Error CodeError Message
4001400Unable to decode the JSON request body. Check your input and try again.
4001401Unable to encode the Custom Metadata as JSON. Check your input and try again.
4001402Zone ID is required. Check your input and try again.
4001403The request has no Authorization header. Check your input and try again.
4001407Invalid custom hostname. Custom hostnames have to be smaller than 256 characters in length, cannot be IP addresses, cannot contain any special characters such as ``~`!@#$%^&*()=+{}[]\
4001408Custom hostnames with non-ASCII characters are not supported. Check your input and try again.
4001409Reserved top domain custom hostnames, such as ’test’, ’example’, ‘invalid’ or ’localhost’, is not supported. Check your input and try again.
4001410Unable to parse custom hostname - :reason. Check your input and try again.
Reasons:
publicsuffix: cannot derive eTLD+1 for domain :domain
publicsuffix: invalid public suffix :suffix for domain :domain
4001411Custom hostnames ending in example.com, example.net, or example.org are prohibited. Check your input and try again.
4001412Custom metadata for wildcard custom hostnames is not supported. Check your input and try again.
4001415Invalid custom origin hostname. Custom origin hostnames have to be smaller than 256 characters in length, cannot be IP addresses, cannot contain any special characters such as ~``~`!@#$%^&*()=+{}[]\
4001416Custom origin hostnames with non-ASCII characters are not supported. Check your input and try again.
4001417Reserved top domain custom origin hostnames, such as ’test’, ’example’, ‘invalid’ or ’localhost’, is not supported. Check your input and try again.
4001418Unable to parse custom origin hostname - :reason. Check your input and try again.
Reasons:
publicsuffix: cannot derive eTLD+1 for domain :domain
publicsuffix: invalid public suffix:suffixfor domain:domain
4001419Custom origin hostnames ending in example.com, example.net, or example.org are prohibited. Check your input and try again.
4001420Wildcard custom origin hostnames are not supported. Check your input and try again.
4001421The custom origin hostname you specified does not exist on Cloudflare as a DNS record (A, AAAA or CNAME) in your zone::zone\_tag. Check your input and try again.
4001422Invalid http2setting. Only ‘on’ or ‘off’ is accepted. Check your input and try again.
4001423Invalidtls\_1\_2\_onlysetting. Only ‘on’ or ‘off’ is accepted. Check your input and try again.
4001424Invalidtls\_1\_3setting. Only ‘on’ or ‘off’ is accepted. Check your input and try again.
4001425Invalidmin\_tls\_versionsetting. Only ‘1.0’,‘1.1’,‘1.2’ or ‘1.3’ is accepted. Check your input and try again.
4001426The certificate that you uploaded cannot be parsed. Check your input and try again.
4001427The certificate that you uploaded is empty. Check your input and try again.
4001428The private key you uploaded cannot be parsed. Check your input and try again.
4001429The private key you uploaded does not match the certificate. Check your input and try again.
4001430The custom CSR ID is invalid. Check your input and try again.
4041431The custom CSR was not found.
4001432The validation method is not supported. Onlyhttp, email, or txt are accepted. Check your input and try again.
4001433The validation type is not supported. Only ‘dv’ is accepted. Check your input and try again.
4001434The SSL attribute is invalid. Refer to the API documentation, check your input and try again.
4001435The custom hostname ID is invalid. Check your input and try again.
4041436The custom hostname was not found.
4001437Invalid hostname.contain query parameter. The hostname.contain query parameter has to be smaller than 256 characters in length, cannot be IP addresses, cannot contain any special characters such as ``~`!@#$%^&*()=+{}[]\
4001438Cannot specify other filter parameters in addition to id. Only one must be specified. Check your input and try again.
4091439Modifying the custom hostname is not supported. Check your input and try again.
4001440Both validation type and validation method are required. Check your input and try again.
4001441The certificate that you uploaded is having trouble bundling against the public trust store. Check your input and try again.
4001442Invalid ciphers setting. Refer to the documentation for the list of accepted cipher suites. Check your input and try again.
4001443Cipher suite selection is not supported for a minimum TLS version of 1.3. Check your input and try again.
4001444The certificate chain that you uploaded has multiple leaf certificates. Check your input and try again.
4001445The certificate chain that you uploaded has no leaf certificates. Check your input and try again.
4001446The certificate that you uploaded does not include the custom hostname - :custom_hostname. Review your input and try again.
4001447The certificate that you uploaded does not use a supported signature algorithm. Only SHA-256/ECDSA, SHA-256/RSA, and SHA-1/RSA signature algorithms are supported. Review your input and try again.
4001448Custom hostnames with wildcards are not supported for certificates managed by Cloudflare. Review your input and try again.
4001449The request input bundle_method must be one of: ubiquitous, optimal, force.
4011000Unable to extract bearer token
4011001Unable to parse JWT token
4011002Bad JWT header
4011003Failed to verify JWT token
4011004Failed to get claims from JWT token
4011005JWT token does not have required claims
4031404No quota has been allocated for this zone. If you are already a paid Cloudflare for SaaS customer, contact your Customer Success Manager for additional provisioning. If you are not yet enrolled, fill out this contact form and our sales team will reach out to you.
4031405Quota exceeded. If you are already a paid Cloudflare for SaaS customer, contact your Customer Success Manager for additional provisioning. If you are not yet enrolled, fill out this contact form and our sales team will reach out to you.
4031413No custom metadata access has been allocated for this zone. If you are already a paid customer, contact your Customer Success Manager for additional provisioning. If you are not yet enrolled, fill out this contact form and our sales team will reach out to you.
4031414Access to setting a custom origin server has not been granted for this zone. If you are already a paid Cloudflare for SaaS customer, contact your Customer Success Manager for additional provisioning. If you are not yet enrolled, fill out this contact form and our sales team will reach out to you.
4091406Duplicate custom hostname found.
5001500Internal Server Error