|
| 1 | +--- |
| 2 | +title: Upload a certificate bundle with an RSA and ECDSA certificate per custom hostname |
| 3 | +description: Upload a certificate bundle with an RSA and ECDSA certificate per custom hostname |
| 4 | +date: 2025-02-14T11:00:00Z |
| 5 | +--- |
| 6 | +import { Card, Render, Details } from "~/components" |
| 7 | + |
| 8 | +Cloudflare has supported both RSA and ECDSA certificates across our platform for a number of years. Both certificates offer the same security, but ECDSA is more performant due to a smaller key size. However, RSA is more widely adopted and ensures compatibility with legacy clients. Instead of choosing between them, you may want both – that way, ECDSA is used when clients support it, but RSA is available if not. |
| 9 | + |
| 10 | +Now, you can upload both an RSA and ECDSA certificate on a custom hostname via the API. |
| 11 | + |
| 12 | +``` |
| 13 | +curl -X POST https://api.cloudflare.com/client/v4/zones/$ZONE_ID/custom_hostnames \ |
| 14 | + -H 'Content-Type: application/json' \ |
| 15 | + -H "X-Auth-Email: $CLOUDFLARE_EMAIL" \ |
| 16 | + -H "X-Auth-Key: $CLOUDFLARE_API_KEY" \ |
| 17 | + -d '{ |
| 18 | + "hostname": "hostname", |
| 19 | + "ssl": { |
| 20 | + "custom_cert_bundle": [ |
| 21 | + { |
| 22 | + "custom_certificate": "RSA Cert", |
| 23 | + "custom_key": "RSA Key" |
| 24 | + }, |
| 25 | + { |
| 26 | + "custom_certificate": "ECDSA Cert", |
| 27 | + "custom_key": "ECDSA Key" |
| 28 | + } |
| 29 | + ], |
| 30 | + "bundle_method": "force", |
| 31 | + "wildcard": false, |
| 32 | + "settings": { |
| 33 | + "min_tls_version": "1.0" |
| 34 | + } |
| 35 | + } |
| 36 | +}’ |
| 37 | +``` |
| 38 | + |
| 39 | +You can also: |
| 40 | + |
| 41 | +* [Upload](/api/resources/custom_hostnames/methods/create/) an RSA or ECDSA certificate to a custom hostname with an existing ECDSA or RSA certificate, respectively. |
| 42 | + |
| 43 | +* [Replace](/api/resources/custom_hostnames/subresources/certificate_pack/subresources/certificates/methods/update/) the RSA or ECDSA certificate with a certificate of its same type. |
| 44 | + |
| 45 | +* [Delete](/api/resources/custom_hostnames/subresources/certificate_pack/subresources/certificates/methods/delete/) the RSA or ECDSA certificate (if the custom hostname has both an RSA and ECDSA uploaded). |
| 46 | + |
| 47 | +This feature is available for Business and Enterprise customers who have purchased custom certificates. |
0 commit comments