Blog
SavedSearch
Visit Hostlelo

Nginx OCSP Stapling After Let's Encrypt Ended OCSP

Let's Encrypt switched off OCSP in August 2025. Check what your Nginx server really sends, remove dead stapling lines and keep Certbot renewals working.

The short answer

Let's Encrypt removed OCSP URLs from certificates on 7 May 2025 and switched off its OCSP responders on 6 August 2025. For Nginx server blocks that use only Let's Encrypt certificates, verify the live certificate, remove obsolete stapling directives, test the exact edited file and reload. Preserve shared resolver settings and keep a private, targeted rollback copy.

Nginx server certificate moving from retired OCSP checks to certificate revocation lists
Reading options

On this page

Before you start

You need sudo access, the exact Nginx config file used by the affected server block, a private effective-config snapshot, a targeted backup of the file you will edit, and a quiet maintenance window. Confirm that each affected block uses only a Let's Encrypt certificate before removing shared directives.

If an Nginx server block uses only a Let's Encrypt certificate, OCSP stapling no longer does anything useful for that certificate. Let's Encrypt removed OCSP URLs from its certificates and then switched off its OCSP responders, so there is no OCSP response left for Nginx to fetch and staple. You can remove the old ssl_stapling directives from that server block after checking that the directives are not inherited from, or shared with, another certificate provider.

Plenty of copy-paste "SSL hardening" snippets still tell you to turn on ssl_stapling, add a resolver and point ssl_trusted_certificate at a chain file. Since August 2025 that is dead weight for Let's Encrypt certificates. The honest way to know where you stand is to check what your server really sends.

By the end of this guide you will be able to check your certificate and your live server, clean up the Nginx config without breaking anything, make sure Certbot is not asking for OCSP Must-Staple, and decide whether stapling still makes sense for any certificates you buy from another provider.

What OCSP stapling actually is

OCSP stands for Online Certificate Status Protocol. It is a way for a browser to ask the certificate authority (the company that issued the certificate) a simple question: has this certificate been revoked, or is it still good?

Asking directly has a cost: it tells the authority which site the visitor is opening.

Stapling fixes this by moving the job to the server. Think of a shop that keeps a fresh, signed receipt from the bank saying "this card machine is genuine and in good standing." When you walk in, the shop hands you the receipt with your change, so you never have to phone the bank yourself. In Let's Encrypt's words, "the web server sends a copy of the appropriate OCSP response during the TLS handshake" (the short exchange that sets up an encrypted connection). The catch: if the bank closes the line that issues receipts, the shop has nothing to hand you.

That is what happened. In its Ending OCSP Support in 2025 post, Let's Encrypt set out the dates: on 7 May 2025 it would "drop OCSP URLs from certificates," and on 6 August 2025 it would "turn off our OCSP responders." Its follow-up post, OCSP Service Has Reached End of Life, confirms the service was turned off on 6 August 2025 and that all Let's Encrypt certificates that contained OCSP URLs had already expired by then. Revocation information now comes only through Certificate Revocation Lists (CRLs), signed lists of revoked certificates.

Why this matters: Let's Encrypt states: "Websites and people who visit them will not be affected by this change." The cleanup is about removing config that cannot work and making sure your renewals do not fail.

Before you start

  • Root or sudo access to the server that runs Nginx.
  • The Nginx version, which you will check in Step 1.
  • A private snapshot of the current Nginx configuration and a separate copy of the exact file you will edit, which you will make in Step 2 before touching anything.
  • A test or staging server if you have one, so you can try the change there first.
  • About 20 to 30 minutes, plus a quiet time of day if the server hosts busy sites.
  • The domain names you want to check, for example example.com and www.example.com.

Heads up: if you never edit Nginx files yourself, skip to the message at the end and send it to your host. If terms like "server block" are new to you, our guide on what web hosting is gives a gentle starting point.

Checking what you have now

Collect facts first: the certificate on disk, the certificate the live server sends, and the stapling lines in your config.

Step 1: Check your Nginx version

Run this command to print the version of Nginx installed on the server.

nginx -v

You should see one line naming nginx and its version number. The stapling directives covered here have existed since Nginx 1.3.7, according to the Nginx SSL module documentation, so any current version supports them.

To find where your main config file lives, use the capital V switch.

nginx -V

Look for --conf-path in the configure parameters it prints. On Ubuntu and Debian with Nginx from the standard repository, your site files usually sit under /etc/nginx/, with enabled sites in /etc/nginx/sites-enabled/, as the Ubuntu Server nginx guide describes.

Step 2: Make a private snapshot and a targeted backup

First save the effective configuration that Nginx is actually loading. Use a unique UTC timestamp, restrict the file to your account, and keep it private: an nginx -T dump can contain internal hostnames, upstream addresses and headers.

umask 077
stamp="$(date -u +%Y%m%dT%H%M%SZ)"
sudo nginx -T > "$HOME/nginx-effective-$stamp.txt" 2>&1
sudo chown "$(id -u):$(id -g)" "$HOME/nginx-effective-$stamp.txt"
chmod 600 "$HOME/nginx-effective-$stamp.txt"

The -T switch, per the Nginx command-line documentation, is the "same as -t, but additionally dump configuration files to standard output."

Next copy the exact file you plan to edit. Replace the example path with the file named by your own nginx -T output.

file=/etc/nginx/sites-available/example.com
backup="$HOME/$(basename "$file").$stamp.bak"
sudo cp --preserve=mode,ownership,timestamps "$file" "$backup"
sudo chown "$(id -u):$(id -g)" "$backup"
chmod 600 "$backup"

Expected result: both commands print nothing. Confirm the two files exist with ls -l "$HOME/nginx-effective-$stamp.txt" "$backup". Store the backup path in your change ticket or terminal notes; the rollback below uses it.

Step 3: Find your stapling lines

Search the loaded configuration for anything related to stapling.

sudo nginx -T 2>/dev/null | grep -n -i -E 'stapling|ssl_trusted_certificate|resolver'

Expected result: either nothing at all, which means stapling was never configured and you can skip ahead to Step 9, or a list of numbered lines such as ssl_stapling on;, ssl_stapling_verify on;, ssl_trusted_certificate with a path, and a resolver line. Do not remove a shared resolver merely because stapling is gone; other Nginx features can use it. Trace each matching directive back to its http, server or included snippet before editing.

Now find which certificate each server block uses.

sudo nginx -T 2>/dev/null | grep -n -E 'server_name|ssl_certificate '

The trailing space skips ssl_certificate_key lines. Note which certificate paths start with /etc/letsencrypt/live/ (Certbot's standard location) and which point somewhere else.

Step 4: Find your certificate and its OCSP URL

Run this command against the certificate file named in your ssl_certificate line. The -ocsp_uri option, per the OpenSSL x509 manual, "prints the OCSP responder address(es) if any."

sudo openssl x509 -in /etc/letsencrypt/live/example.com/fullchain.pem -noout -ocsp_uri

The Nginx docs say a combined certificate file lists your own certificate first, then the intermediates, so this reads your server certificate.

Expected result for a current Let's Encrypt certificate: no output at all. An empty result means the certificate carries no OCSP URL, so there is nothing for Nginx to staple. For a certificate from another provider you will usually see a single line starting with http://.

To see who issued the certificate and when it expires, add two more options.

sudo openssl x509 -in /etc/letsencrypt/live/example.com/fullchain.pem -noout -issuer -enddate

You should see an issuer= line naming the organisation that signed it and a notAfter= line with the expiry date. At the time of writing (17 November 2026), the Let's Encrypt certificates page lists YE1, YE2, YR1 and YR2 as its active intermediates, with older ones such as E7 and R12 marked as retired.

Step 5: Check what the live server really sends

The file on disk and the certificate Nginx serves are not always the same. Run this command to fetch the live certificate and inspect it.

openssl s_client -connect example.com:443 -servername example.com < /dev/null 2>/dev/null | openssl x509 -noout -issuer -enddate -ocsp_uri

The -servername option sets SNI (Server Name Indication, the field that tells the server which site you want). Expected result: the same issuer and expiry date as Step 4, and no OCSP URL line for a Let's Encrypt certificate. If the dates differ, Nginx is still serving an older certificate and needs a reload.

Cleaning up the Nginx config

The changes below only touch server blocks that use Let's Encrypt.

Step 6: Remove stapling lines from Let's Encrypt server blocks

Open the file that contains the server block you want to change. On Ubuntu and Debian that is usually a file in /etc/nginx/sites-available/ linked from sites-enabled.

sudo nano /etc/nginx/sites-available/example.com

Delete these lines from the server block if they are present: ssl_stapling, ssl_stapling_verify, ssl_stapling_file, ssl_stapling_responder, and the ssl_trusted_certificate line that pointed at the Let's Encrypt chain.pem. The default for both ssl_stapling and ssl_stapling_verify is off, so removing them simply returns Nginx to its default.

A clean Let's Encrypt HTTPS server block can be as short as this. Keep your own root, location and other lines as they are.

server {
    listen 443 ssl;
    server_name example.com www.example.com;

    ssl_certificate     /etc/letsencrypt/live/example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;

    root /var/www/example.com;
    index index.html;
}

Heads up: be careful with the resolver line. The Nginx core docs describe it as configuring "name servers used to resolve names of upstream servers into addresses," so other parts of your config may rely on it. If you are not sure whether something else depends on it, leave resolver in place. It does no harm on its own.

If the lines live in the http block or a shared snippet, you can delete them there. Both directives are allowed in the http and server contexts, so you can instead add ssl_stapling off; to each Let's Encrypt server block and leave the shared file alone.

Step 7: Test the configuration

Always test before reloading. The -t switch makes Nginx check the configuration "for correct syntax, and then tries to open files referred in the configuration."

sudo nginx -t

Expected result: a short message saying the syntax is fine and the test was successful. If you see an error instead, read it closely, because it normally points to the file and line that caused it. Fix it, or restore your backup, and test again.

Step 8: Reload Nginx

Once the test passes, reload so Nginx picks up the change without dropping connections.

sudo nginx -s reload

On Ubuntu and Debian the Ubuntu documentation uses the service manager instead.

sudo systemctl reload nginx

Expected result: both commands print nothing on success. The Nginx beginner's guide explains that on reload the master process checks the new configuration and, if it cannot apply it, "rolls back the changes and continues to work with the old configuration."

Making sure Certbot is not asking for Must-Staple

OCSP Must-Staple is a flag inside the certificate that tells browsers to refuse the connection if no stapled response arrives. Let's Encrypt was blunt about it: "As of May 7, all issuance requests that include the OCSP Must Staple extension will fail, including renewals." Its advice is to "change your ACME client configuration to not request the extension."

Step 9: Check your renewal settings

Certbot remembers the options you used when you first got a certificate and stores them in /etc/letsencrypt/renewal/CERTNAME.conf, according to the Certbot user guide. Search those files for any mention of stapling.

sudo grep -i -n staple /etc/letsencrypt/renewal/*.conf

Expected result: no output, which suggests none of your certificates were set up with --must-staple or --staple-ocsp. If you see a matching line, note which file it is in. The file name matches the certificate name.

List your certificates to confirm their names.

sudo certbot certificates

Step 10: Remove Must-Staple from a certificate's renewal options

The Certbot docs warn that manually editing files under /etc/letsencrypt/renewal/ "can damage them if done improperly." For Certbot 2.3.0 and newer, the supported route is the certbot reconfigure command, which runs a test renewal with the new options and saves them only if it succeeds. Check which options your version can change.

sudo certbot help reconfigure

Run reconfigure with the --cert-name of the affected certificate and the option your version lists for turning the setting off. Then confirm renewal works.

sudo certbot renew --dry-run

Expected result: Certbot finishes without errors and reports success for each certificate it tested. On a version older than 2.3.0, or if the help text lists no way to turn the option off, ask your developer or host rather than editing the file by hand.

Quick tip: Certbot's --staple-ocsp option "enables OCSP Stapling." If Step 9 found it, Steps 6 to 8 are where you clean up the Nginx side.

When stapling still helps: certificates from other providers

If Step 4 printed an http:// OCSP URL for a certificate you bought elsewhere, that provider still runs a responder, and stapling still does its original job of saving visitors a lookup. Keeping it or dropping it is your decision; both are reasonable if the result works.

If you keep it, the Nginx docs list what it needs: the issuer certificate should be known (in the ssl_certificate file if it includes intermediates, otherwise in ssl_trusted_certificate), and a resolver should be set so Nginx can look up the responder's hostname. For ssl_stapling_verify to work, the issuer, the root and all intermediates must be in ssl_trusted_certificate. A complete example:

server {
    listen 443 ssl;
    server_name shop.example.com;

    ssl_certificate     /etc/ssl/shop.example.com/fullchain.pem;
    ssl_certificate_key /etc/ssl/shop.example.com/privkey.pem;

    ssl_stapling on;
    ssl_stapling_verify on;
    ssl_trusted_certificate /etc/ssl/shop.example.com/ca-bundle.pem;

    resolver 192.0.2.10 valid=300s;
    resolver_timeout 5s;

    root /var/www/shop.example.com;
    index index.html;
}

Replace 192.0.2.10 with a DNS server you trust. The Nginx core docs recommend "configuring DNS servers in a properly secured trusted local network" to prevent DNS spoofing. The ca-bundle.pem file should hold the intermediate and root certificates from your provider.

Two limits: ssl_stapling_responder only supports http:// responders, and ssl_stapling_file serves a fixed DER file that goes stale unless something refreshes it.

Example scenario (made up)

A small agency runs 14 client sites on one VPS. Years ago someone pasted a stapling snippet into the http block. Twelve sites use Let's Encrypt; two use a paid certificate.

Steps 4 and 5 show no OCSP URL for the twelve and an http:// URL for the two. The agency moves the stapling lines into the two paid sites' server blocks, runs nginx -t, reloads and runs the Certbot dry run. It takes about 25 minutes.

Rolling back

Restore only the file you changed; copying an old tree over all of /etc/nginx can overwrite unrelated changes made after your backup. Use the file and backup variables from Step 2 in the same shell session, or set them again to the exact paths you recorded.

file=/etc/nginx/sites-available/example.com
backup="$HOME/example.com.YYYYMMDDTHHMMSSZ.bak"
sudo cp --preserve=mode,ownership,timestamps "$backup" "$file"
sudo nginx -t && sudo systemctl reload nginx

Replace the placeholder timestamp before running the command. Expected result: nginx -t reports that the syntax is OK and the reload completes without an error. If the test fails, do not reload; compare the target file with the private effective-config snapshot and ask the server administrator to review the difference.

How to check it worked

Run the OpenSSL client with the -status option. The OpenSSL client manual says it "sends a certificate status request to the server (OCSP stapling). The server response (if any) is printed out."

openssl s_client -connect example.com:443 -servername example.com -status < /dev/null

Scroll through the output and look for a printed OCSP response. For a Let's Encrypt site there should be none, while the certificate chain and handshake details still appear. For a site where you kept stapling, an OCSP response should be printed.

Then repeat Step 5 to confirm the served certificate matches the one on disk, and run the Certbot dry run from Step 10 once more.

Troubleshooting

Problem: the config test fails after your edit

Symptom: nginx -t reports an error instead of a successful test. Cause: usually a missing semicolon, a deleted closing brace, or a directive left half removed. Fix: open the file at that line, correct it and test again. If you cannot spot it, roll back and redo Step 6.

Problem: Certbot renewals started failing in 2025

Symptom: certbot renew or the dry run fails for one certificate while others renew fine, and Step 9 found a staple setting in that certificate's renewal file. Cause: Let's Encrypt rejects every request that includes Must-Staple, renewals included, since 7 May 2025. Fix: follow Step 10 to remove the option with certbot reconfigure, then run the dry run again.

Problem: warnings about OCSP or stapling in the Nginx error log

Symptom: your error log keeps showing warnings that mention OCSP or stapling for a Let's Encrypt site. Cause: ssl_stapling is still on for a certificate that has no OCSP URL, often inherited from the http block. Fix: find where it is set with the Step 3 search, remove it or add ssl_stapling off; to that server block, then test and reload.

Problem: your change does not seem to apply

Symptom: you removed the lines, reloaded, but the Step 3 search still shows them. Cause: you edited a file Nginx does not load, such as a copy in sites-available that has no link in sites-enabled, or the same lines exist in a second included file. Fix: find every copy in the nginx -T output, edit the included file, then test and reload.

Problem: stapling does not work for a non-Let's-Encrypt certificate

Symptom: the -status check shows no OCSP response for a site whose certificate does have an http:// OCSP URL. Cause: commonly a missing resolver, an issuer certificate Nginx cannot find, an incomplete ssl_trusted_certificate bundle when verification is on, or a firewall blocking the server's outgoing requests to the responder. Fix: compare with the example block above.

Problem: a VPN or internal tool breaks after a certificate renewal

Symptom: browsers are happy, but a non-browser client starts rejecting the certificate. Cause: some software expects an OCSP URL. Let's Encrypt warns that for non-browser uses "you should ensure that your software operates correctly if certificates contain no OCSP URL." Fix: update or reconfigure that software, with its vendor's help if needed.

Pro tips and security notes

Never share privkey.pem. The Certbot docs put it plainly: "This must be kept secret at all times!" Check any dump you share for key material first.

Why this matters: removing stapling does not weaken HTTPS for Let's Encrypt sites. Encryption is unaffected, and Let's Encrypt still publishes revocation information through CRLs. If you also run Apache sites, our guide to redirecting HTTP to HTTPS with .htaccess covers that side.

Ask your host or a developer when you do not have root access, when the config is generated by a control panel that overwrites manual edits, when Certbot is older than 2.3.0 and a certificate still has Must-Staple, or when a non-browser client breaks and you do not control its settings.

The one message worth forwarding

If someone else manages your server, copy and send this.

Hi, could you check our Nginx TLS setup for example.com? Let's Encrypt turned off its OCSP responders on 6 August 2025 and no longer puts OCSP URLs in its certificates. Please confirm that the certificate we serve has no OCSP URL (openssl x509 with the ocsp uri option prints nothing), remove any ssl stapling lines from server blocks that use Let's Encrypt certificates, test the config before reloading, and make sure our Certbot renewal settings do not request OCSP Must-Staple, then run certbot renew with the dry run option to confirm renewals work. If any of our sites use a certificate from another provider that still has an OCSP URL, please leave stapling on for those and tell us. Please take a backup of the Nginx config first. Thank you.

The takeaway: for Let's Encrypt certificates, OCSP stapling has nothing left to staple, so check what your server sends, remove the dead lines, and keep stapling only where a provider still runs a responder.

Reader questions

Will my visitors notice anything when I remove OCSP stapling from a Let's Encrypt site?

No. Let's Encrypt says websites and the people who visit them are not affected by the end of OCSP, and it now publishes revocation information through CRLs instead.

Is OCSP stapling bad for security now?

Stapling itself is not harmful. For Let's Encrypt certificates it simply has nothing to fetch, while certificates from providers that still run an OCSP responder can still use it.

What replaced OCSP at Let's Encrypt?

Certificate Revocation Lists. Let's Encrypt now publishes revocation information only through CRLs, and its certificates page lists a CRL hostname for each intermediate.

Do I need to change anything if I never turned on stapling?

Probably not in Nginx, since ssl_stapling is off by default. It is still worth checking that your ACME client is not requesting OCSP Must-Staple, because those requests now fail.

Can I keep ssl_stapling on in the http block if some sites use another certificate provider?

Yes. The directive works in both http and server contexts, so you can keep it for the whole server and switch it off in the server blocks that use Let's Encrypt, or the other way round.

Does this affect Apache servers too?

The Let's Encrypt change applies to every server using its certificates. The Nginx steps here do not apply to Apache, so check the Apache documentation for its own stapling directives.

Sources & further reading

  1. Let's Encrypt: Ending OCSP Support in 2025
  2. Let's Encrypt: OCSP Service Has Reached End of Life
  3. Let's Encrypt: Chains of Trust
  4. Nginx: ngx_http_ssl_module
  5. Nginx: ngx_http_core_module (resolver)
  6. Nginx: Command-line parameters
  7. Nginx: Beginner's Guide
  8. OpenSSL: openssl-s_client
  9. OpenSSL: openssl-x509
  10. Certbot User Guide

What changed

Verified the Let's Encrypt OCSP end-of-life dates and Nginx behavior against current primary documentation. Replaced fixed-date and whole-tree rollback commands with private timestamped evidence, a targeted file backup and a test-before-reload rollback. Added shared-resolver scope guidance and original accessible media.

Originally published . About our editorial updates.

Your next project deserves a better foundation.

Explore hosting built for your next chapter.

Explore hosting

Find your next answer.

Search published guides and articles.

Ctrl / ⌘ K to open · Esc to close