You spin up a customer-facing PaaS environment, the platform offers a one-click “issue an SSL certificate” button, you click it, traffic flows. Six months later you onboard your first enterprise customer who needs tenant42.yourapp.com and an EV-style organization-validated cert with HSTS preload. The platform’s built-in wildcard doesn’t cover the case. Now you’re picking between bringing your own DV/OV cert, or running your own wildcard renewal pipeline with DNS-01 challenges. Both are fine. Picking the wrong one for your traffic shape costs you a 3am page when a cert expires unattended.
What’s happening
PaaS platforms typically offer two SSL paths:
Built-in cert (platform-managed). The platform issues, installs, and renews a certificate for the environment’s hostname — usually a free Let’s Encrypt DV cert covering the apex and www, sometimes with wildcard support for subdomains under the platform’s own domain (e.g. *.yourapp.platform-domain.example). Pros: zero operational burden, renewal happens silently, the platform handles the HTTP-01 or DNS-01 challenge against its own infra. Cons: limited cert types (only DV, no OV/EV), limited SAN coverage, you don’t own the private key, and it usually requires that DNS for the hostname be either pointed at the platform’s nameservers or use a specific CNAME pattern.
Custom cert (bring your own). You upload a certificate and private key you obtained yourself — from Let’s Encrypt via DNS-01, from a commercial CA, from your enterprise PKI. Pros: full control over cert type (DV, OV, EV), wildcard scope of your choosing, multi-SAN coverage, you keep the private key, works regardless of where DNS lives. Cons: you operate the renewal pipeline. A 90-day Let’s Encrypt cert renewed manually is a ticking countdown.
The decision usually breaks down as:
- Built-in is correct when: the cert covers a hostname the platform can validate (typically yours-pointed-at-the-platform), DV is enough for your compliance scope, and you don’t need wildcard semantics for tenant subdomains.
- Custom is correct when: you need a wildcard covering
*.tenants.yourapp.com, you need an OV/EV cert with your organization name, you need to use a specific CA your security team trusts, or your DNS is managed somewhere the platform can’t reach for ACME validation.
The wildcard question deserves its own paragraph. Wildcard certs from public CAs (Let’s Encrypt included) require DNS-01 validation — the CA puts a TXT record challenge in your zone, the ACME client proves it owns the zone, the cert is issued. The platform can’t do this on your behalf unless your DNS lives at the platform; you almost always end up running your own ACME client with a DNS provider plugin (Route 53, Cloudflare, OVH, etc.).
The renewal automation is what determines whether a custom-cert pipeline is sustainable or a hand grenade with a 90-day fuse.
How to verify
What cert is currently in play, and when does it expire:
echo | openssl s_client -servername app.example.com -connect app.example.com:443 2>/dev/null \
| openssl x509 -noout -subject -issuer -dates -ext subjectAltName
# subject=CN = app.example.com
# issuer=C = US, O = Let's Encrypt, CN = R3
# notBefore=...
# notAfter=Aug 15 14:23:18 2026 GMT
# X509v3 Subject Alternative Name:
# DNS:app.example.com, DNS:www.app.example.com
The platform-issued cert will show a subject matching your hostname and an issuer like Let’s Encrypt R3. A custom uploaded cert will show whatever CA you used.
Days until expiry, in one line:
EXP=$(echo | openssl s_client -servername app.example.com -connect app.example.com:443 2>/dev/null \
| openssl x509 -noout -enddate | cut -d= -f2)
echo "Expires: $EXP"
echo "Days remaining: $(( ( $(date -j -f "%b %d %T %Y %Z" "$EXP" +%s) - $(date +%s) ) / 86400 ))"
If days remaining is less than 30 and there’s no automation, you have a problem. If days remaining is under 7, you have an active fire.
Test that an alternate SAN works (wildcard check):
curl -sI --resolve tenant99.yourapp.com:443:$(dig +short app.example.com | head -1) \
https://tenant99.yourapp.com/ 2>&1 | grep -E "HTTP|SSL"
# HTTP/2 200 → wildcard works
# SSL certificate problem → not in SAN list
The fix
If the built-in cert is enough — accept it. Don’t build a custom pipeline you don’t need. Confirm renewal is automatic on the platform’s side, check expiry monthly via a synthetic monitor, move on.
If you need a custom wildcard cert with Let’s Encrypt and DNS-01, the renewal pipeline is the article. Two patterns work well on PaaS:
Pattern 1 — ACME client on a dedicated cert-renewer container. Deploy a small container with certbot or acme.sh, give it credentials to your DNS provider’s API, schedule a daily renewal check. The container writes the renewed cert+key to a shared volume or an object-storage bucket, and the LB picks it up on the next reload.
# Cert-renewer container — runs daily via cron, certbot + Cloudflare DNS plugin
dnf -y install epel-release
dnf -y install certbot python3-certbot-dns-cloudflare
mkdir -p /etc/letsencrypt/cf
cat > /etc/letsencrypt/cf/credentials.ini <<'CRED'
dns_cloudflare_api_token = <scoped token with Zone:DNS:Edit on the target zone only>
CRED
chmod 600 /etc/letsencrypt/cf/credentials.ini
# First issue
certbot certonly \
--dns-cloudflare \
--dns-cloudflare-credentials /etc/letsencrypt/cf/credentials.ini \
--dns-cloudflare-propagation-seconds 30 \
-d 'yourapp.com' \
-d '*.yourapp.com' \
-d '*.tenants.yourapp.com' \
--agree-tos \
-m ops@example.com \
--non-interactive
# Renewal hook — pushes cert to LB and reloads
cat > /etc/letsencrypt/renewal-hooks/deploy/push-to-lb.sh <<'HOOK'
#!/usr/bin/env bash
set -euo pipefail
CERT_DIR=/etc/letsencrypt/live/yourapp.com
LB_HOST=lb.internal.example.com
# Upload fullchain.pem and privkey.pem to the LB
scp -i /root/.ssh/lb_deploy_key \
"${CERT_DIR}/fullchain.pem" "${CERT_DIR}/privkey.pem" \
cert-deploy@${LB_HOST}:/etc/nginx/certs/
# Validate and reload nginx on the LB
ssh -i /root/.ssh/lb_deploy_key cert-deploy@${LB_HOST} \
'sudo nginx -t && sudo systemctl reload nginx'
HOOK
chmod 700 /etc/letsencrypt/renewal-hooks/deploy/push-to-lb.sh
# Daily renewal cron
cat > /etc/cron.d/certbot-renew <<'CRON'
17 3 * * * root certbot renew --quiet --no-random-sleep-on-renew
CRON
# Test it dry-runs cleanly
certbot renew --dry-run
Pattern 2 — ACME client co-located on the LB itself. If your dedicated LB has outbound internet, you can run certbot directly on it. Simpler — no key transport across hosts. Worse if you ever scale to multiple LB instances behind keepalived, because each one needs its own renewal or you copy the key between them anyway.
A monitoring check that pages someone (via the support desk) at 14 days, 7 days, and 3 days before expiry is the second half of the fix. The renewal pipeline failing silently is far more dangerous than not having one — at least without one you know you have to do it manually. A check that’s been failing for 70 days lets the operator believe everything’s fine right up until the browser warning lands on the homepage.
# Synthetic check — drop on your monitoring host
#!/usr/bin/env bash
set -euo pipefail
DOMAINS=(app.example.com api.example.com tenant99.example.com)
WARN_DAYS=14
CRIT_DAYS=3
for d in "${DOMAINS[@]}"; do
exp=$(echo | openssl s_client -servername "$d" -connect "$d:443" 2>/dev/null \
| openssl x509 -noout -enddate | cut -d= -f2)
exp_s=$(date -d "$exp" +%s 2>/dev/null || gdate -d "$exp" +%s)
now_s=$(date +%s)
days=$(( (exp_s - now_s) / 86400 ))
if (( days <= CRIT_DAYS )); then status=CRIT
elif (( days <= WARN_DAYS )); then status=WARN
else status=OK; fi
echo "$status $d expires in $days days ($exp)"
done
If the renewal stays automatic and the monitor stays loud, you’ll forget the cert exists. That’s the goal.
We run wildcard cert renewal pipelines for SaaS tenancy on managed PaaS with the renewal hook tested every release and expiry alerts wired into monitoring — let’s discuss your tenancy model if a single wildcard isn’t enough for your subdomain layout.