Developers

SSL Certificates for APIs and Mobile App Backends

Every public API endpoint needs a publicly trusted SSL certificate for API traffic, or apps and partner systems will refuse to connect. This guide shows which certificate fits `api.example.com`, why hard pinning is risky with short lifetimes, and where mutual TLS fits in.

An SSL certificate for API endpoints does the same job as one for a website: it proves to the client that it is talking to your server and encrypts the traffic in transit. If your API is reached by browsers, mobile apps or partner systems you do not control, it needs a publicly trusted certificate. A self-signed or private certificate only works when you also control every client.

Key factWhat it means for your API
Who needs a public certificateAny endpoint called by clients you do not manage (apps in the field, browsers, partners)
Validation levelDomain validation is usually enough – nobody sees an organization name in an API call
Maximum lifetime200 days for certificates issued from 15 Mar 2026; 100 days from 15 Mar 2027; 47 days from 15 Mar 2029 (CA/Browser Forum ballot SC-081)
Typical choiceSingle-domain for one API host, wildcard for several API subdomains
Client authenticationMutual TLS needs separate client certificates, not your server certificate

Do APIs need a public SSL certificate?

Yes, if public clients call them. Mobile operating systems, browsers and HTTP libraries check the server certificate against their built-in root stores. A certificate from a private CA fails that check unless you ship your own trust anchor in every client – which you cannot do for third-party integrators or browser-based single-page apps.

Internal service-to-service traffic is different. When both ends run inside your network and you control the trust store, a private CA can work. Public CAs also do not issue certificates for internal names or reserved IP addresses, so purely internal hosts are a private-PKI job anyway. For most REST and GraphQL APIs exposed to the internet, domain validated (DV) SSL is the practical fit: the CA confirms you control the domain by email, DNS record or HTTP file, and the encryption strength is the same as with OV or EV.

Secure your API endpoint with a DV certificate

Domain-validated certificates from Sectigo, RapidSSL, GeoTrust and Thawte – ideal for API hosts where nobody reads the organization name.

Browse DV SSL certificates

Which SSL certificate for API hosts like api.example.com?

For one API host, a single-domain certificate is enough. If you run several API subdomains – api.example.com, auth.example.com, sandbox.example.com – a wildcard for *.example.com covers all of them on one subdomain level. A multi-domain (SAN) certificate fits when your endpoints live on different registered domains.

Your setupCertificate typeNote
One host: api.example.comSingle-domain DVSimplest; one name to validate
Several API subdomainsWildcard DV (*.example.com)Covers one level only – not v2.api.example.com
Endpoints on different domainsMulti-domain (SAN)One certificate, several listed names
Versioned hosts like v1.api.example.comWildcard for *.api.example.comOrder the wildcard on the level you actually use

Keep the private key of a wildcard on as few machines as possible. One wildcard key copied across many servers means one leak exposes every subdomain at once.

DV certificates that suit API endpoints

Should your mobile app pin certificates?

Usually not. Certificate pinning – hard-coding which certificate or public key your app accepts – breaks the app the moment the pinned certificate changes. As of October 2026, public TLS certificates are issued for at most 200 days, falling to 47 days by 2029, so your server certificate will change several times during the life of an installed app version.

Users who do not update their app are then locked out until they do. The OWASP Pinning Cheat Sheet states that the risk of outages almost always outweighs the security gain. Modern clients already validate the full chain, and Certificate Transparency makes mis-issued certificates easier to spot. For the bigger picture on how secure SSL is without pinning, see our security guide.

Tip: If a regulator or customer contract forces you to pin, pin a public key (SubjectPublicKeyInfo) rather than the certificate, include at least one backup pin, and make sure you can update the pin set remotely.

If you must pin: lower-risk options

  • Pin the public key

    Reuse the same key pair across renewals so the pin survives a new certificate. Rotate the key on a planned schedule. | link:

  • Add a backup pin

    Ship a second pin for the issuing CA or a pre-generated spare key, so one change does not lock users out. | link:

  • Make pins updatable

    Deliver the pin set through remote config with an expiry date, not only inside the app binary. | link:

What is mutual TLS (mTLS)?

Mutual TLS means both sides present a certificate: the server proves its identity to the client, and the client proves its identity to the server. It is common for B2B APIs, payment integrations and machine-to-machine traffic where an API key alone is not strong enough.

The client side uses a client authentication certificate. For people, these are sold alongside S/MIME email certificates as personal authentication certificates. For devices and services, most teams run a private CA because they control both ends and need to issue many short-lived certificates.

Note: As of October 2026, public CAs are removing the client authentication purpose (clientAuth EKU) from public TLS server certificates to follow the Chrome Root Program’s rule that server certificate hierarchies serve server authentication only. Do not plan to reuse your API’s server certificate as an mTLS client certificate.

Keep API certificates from expiring

  1. Inventory every endpoint

    List each API host, load balancer and CDN edge that terminates TLS, plus who owns it.

  2. Automate issuance

    Use an ACME client or a "Plan + Automate" product so renewals run without a manual CSR.

  3. Deploy without downtime

    Reload the server or upload to the load balancer automatically after each renewal.

  4. Monitor expiry and chain

    Check each endpoint from outside your network so a missing intermediate shows up before clients fail.

Automating renewals for API endpoints

With lifetimes shrinking towards 47 days, manual renewal does not scale for APIs with several hosts. Paid certificates can be renewed through the same ACME protocol that Certbot and acme.sh use; our guide on ACME with paid certificates shows the setup with External Account Binding.

Two API-specific checks are worth adding. First, serve the full chain (server certificate plus intermediate): browsers often repair a missing intermediate, but many HTTP libraries and app clients do not. Second, test from the client side after each renewal – a mobile app or SDK that worked yesterday can fail on a chain change your browser never notices.

Pick the DV certificate for your API

Single-domain or wildcard, with ACME automation options – all publicly trusted by browsers, mobile platforms and HTTP libraries.

Compare DV SSL certificates

Products

Categories

  • DV SSL Certificates

    Fast domain validation for websites that primarily need HTTPS and do not require organization-level…

    from $8.99
  • Wildcard SSL Certificates

    Protect eligible subdomains under one base domain and simplify certificate management for multi-subdomain websites.

    from $20.99

Related articles

Frequently asked questions

Do APIs need a public SSL certificate?

Yes, whenever public clients call them. Mobile apps, browsers, partner systems and HTTP libraries check your certificate against their built-in root stores, so a self-signed or private-CA certificate fails unless you control every client and install your own trust anchor. Internal service-to-service traffic inside your own network can use a private CA instead. For internet-facing REST or GraphQL APIs, a domain-validated certificate is usually the practical choice.

Should my app pin certificates?

In most cases, no. Pinning breaks your app whenever the pinned certificate changes, and as of October 2026 public certificates last at most 200 days, falling to 47 days from March 2029. Users on old app versions get locked out until they update. If you must pin, pin a public key rather than the certificate, ship a backup pin and make the pin set updatable through remote configuration.

What is mutual TLS?

Mutual TLS (mTLS) means both sides authenticate with certificates: the server proves its identity to the client, and the client presents its own certificate to the server. It is used for B2B APIs and machine-to-machine traffic. People can use personal authentication certificates from our email and client certificate category; devices and services usually get client certificates from a private CA. Your public server certificate is not meant to double as a client certificate.

Which certificate for api.example.com?

For a single API host such as api.example.com, a single-domain DV certificate is enough. If you run several API subdomains, a wildcard for *.example.com covers all of them, but only on one level – v2.api.example.com would need a wildcard for *.api.example.com. If your endpoints sit on different registered domains, choose a multi-domain (SAN) certificate that lists each name.