Skip to content

Manage custom certificates

This page lists Cloudflare requirements for custom certificates and explains how to upload and update these certificates using Cloudflare dashboard or API.

Certificate requirements

Before accepting custom certificates, Cloudflare parses them and checks for validity according to a list of requirements.

Full list of requirements

Each custom certificate you upload must:

  • Be encoded in PEM format (PEM, PKCS#7, or PKCS#12). See Converting Using OpenSSL for conversion examples.

  • Not have a key file password.

  • Not be expiring in less than 14 days from time of upload.

  • Have a subject alternative name (SAN) matching at least one hostname in the zone where it is being uploaded.

  • Use a private key greater than or equal to a minimum length. Currently, 2048 bit for RSA and 225 bit for ECDSA.

  • Be publicly trusted by a major browser. This does not apply for certificates that specify User Defined as their bundling methodology.

  • Be one of the following certificate types:

    • Unified Communications Certificates (UCC)
    • Extended Validation (EV)
    • Domain Validated (DV)
    • Organization Validated (OV)

Upload a custom certificate

To upload a custom SSL certificate in the dashboard:

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

  2. Select your application.

  3. Go to SSL/TLS.

  4. In Edge Certificates, select Upload Custom SSL Certificate.

  5. Copy and paste relevant values into SSL Certificate and Private key text areas (or select Paste from file).

  6. Choose the appropriate Bundle Method.

  7. Select a value for Private Key Restriction.

  8. Select a value for Legacy Client Support, which specifies Server Name Indication (SNI) support:

    • Modern (recommended): SNI only

    • Legacy: Supports non-SNI

  9. Select Upload Custom Certificate. If you see an error for The key you provided does not match the certificate, contact your Certificate Authority to ensure the private key matches the certificate.

  10. (optional) Add a CAA DNS record.


Update an existing custom certificate

Before you update an existing custom certificate, you might want to consider having active universal or advanced certificates as fallback options. Go to SSL/TLS > Edge Certificates to check a list of hostnames and status of the edge certificates in your zone.

If you are on an Enterprise plan and want to update a custom (modern) certificate, also consider requesting access to Staging environment (Beta).

Replacing a custom certificate following these steps does not lead to any downtime. No connections will be terminated and new connections will use the new certificate. The old certificate will only actually be deleted when the new certificate is uploaded and active.

To update a certificate in the dashboard:

  1. Log in to the Cloudflare dashboard and select your account.
  2. Select your application.
  3. Go to SSL/TLS.
  4. In Edge Certificates, locate a custom certificate.
  5. Select the wrench icon and select Replace SSL certificate and key.
  6. Follow the same steps as upload a new certificate.