<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Adam Reeves</title>
    <description>The latest articles on DEV Community by Adam Reeves (@adamreeves_dev).</description>
    <link>https://dev.to/adamreeves_dev</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4285162%2F1d38287d-5d72-444f-80c7-ba363b884467.png</url>
      <title>DEV Community: Adam Reeves</title>
      <link>https://dev.to/adamreeves_dev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/adamreeves_dev"/>
    <language>en</language>
    <item>
      <title>Installing a Free SSL Certificate on Shared Hosting, Step by Step</title>
      <dc:creator>Adam Reeves</dc:creator>
      <pubDate>Sun, 06 Dec 2026 09:15:24 +0000</pubDate>
      <link>https://dev.to/adamreeves_dev/installing-a-free-ssl-certificate-on-shared-hosting-step-by-step-2nno</link>
      <guid>https://dev.to/adamreeves_dev/installing-a-free-ssl-certificate-on-shared-hosting-step-by-step-2nno</guid>
      <description>&lt;p&gt;Not every host renews certificates for you. Some shared plans ship with AutoSSL turned off, some run it only on the main domain, and some fail quietly when the validation file cannot be fetched. When that happens you are left with the manual path: generate a key pair, prove you control the domain, collect the files, and paste them into your hosting panel.&lt;/p&gt;

&lt;p&gt;That path is worth knowing even if you never plan to use it. It takes about fifteen minutes the first time, and it is the same sequence every certificate authority expects.&lt;/p&gt;

&lt;h2&gt;
  
  
  Check what the server is actually serving
&lt;/h2&gt;

&lt;p&gt;Before changing anything, find out what is on port 443 today:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; openssl s_client -connect example.com:443 -servername example.com 2&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;/dev/null \
  &lt;span class="o"&gt;|&lt;/span&gt; openssl x509 -noout -subject -issuer -dates
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Read three things: the subject should match your hostname, the issuer should be a real CA, and &lt;code&gt;notAfter&lt;/code&gt; should be in the future. If the subject is the host's own name, or the dates are stale, the certificate is not being managed for your domain.&lt;/p&gt;

&lt;p&gt;A browser-based checker gives the same answer without a terminal, which is handy when you are working from a phone. &lt;a href="https://tryfreessl.com" rel="noopener noreferrer"&gt;TryFreeSSL's live SSL checker&lt;/a&gt; shows the issuer, the days remaining and the server for any hostname, and it is also where the certificate in this guide can be issued, so the check and the issuance happen in one place.&lt;/p&gt;

&lt;h2&gt;
  
  
  Generate the private key and the CSR
&lt;/h2&gt;

&lt;p&gt;A certificate authority signs a public key, and the CSR is how you hand that public key over:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;openssl req -new -newkey rsa:2048 -nodes \
  -keyout example.com.key -out example.com.csr \
  -subj &lt;span class="s2"&gt;"/CN=example.com"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two details matter. &lt;code&gt;-nodes&lt;/code&gt; leaves the key unencrypted so the web server can read it without a passphrase at startup. And the key file must stay private: never paste it into a support ticket, never commit it, never email it. For a wildcard, use &lt;code&gt;CN=*.example.com&lt;/code&gt;, but note that wildcards need DNS validation, which we get to below.&lt;/p&gt;

&lt;p&gt;If you have no shell access, which is normal on shared hosting, a CSR generator does the same work in the browser and gives you the CSR text plus a key file to download. Whatever tool you use, make sure the private key is generated in a place where you can keep it, and clear it from the tool afterwards if the tool offers that.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prove you control the domain
&lt;/h2&gt;

&lt;p&gt;The CA will not sign anything until you show you control the hostname. Two methods cover almost everything:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTTP validation.&lt;/strong&gt; You publish a small file under &lt;code&gt;/.well-known/acme-challenge/&lt;/code&gt; containing a token the CA gives you. Create the directory, upload the file, confirm it loads over plain HTTP, then ask for validation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;DNS validation.&lt;/strong&gt; You add a TXT record named &lt;code&gt;_acme-challenge.example.com&lt;/code&gt; with the token as its value. This is the only option for wildcards, and it is more reliable when the site sits behind a proxy or a CDN that swallows unknown paths.&lt;/p&gt;

&lt;p&gt;Two traps here. If the site already redirects HTTP to HTTPS and the current certificate is broken, the validator can follow the redirect into a failed TLS handshake, so let the challenge path through unredirected. And DNS changes can take a while to appear, so give a TXT record time before you retry, rather than firing the same request repeatedly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Collect the three files
&lt;/h2&gt;

&lt;p&gt;When issuance finishes you get three pieces:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The certificate itself (&lt;code&gt;.crt&lt;/code&gt; or &lt;code&gt;.pem&lt;/code&gt;), for your domain.&lt;/li&gt;
&lt;li&gt;The private key (&lt;code&gt;.key&lt;/code&gt;) you generated earlier.&lt;/li&gt;
&lt;li&gt;The CA bundle, sometimes called the intermediate or chain file.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The common mistake is installing the certificate alone. Some browsers will paper over the missing intermediate, but curl, Android clients and most API integrations will not. If a checker says the chain is incomplete, you are missing the bundle.&lt;/p&gt;

&lt;h2&gt;
  
  
  Install it in cPanel
&lt;/h2&gt;

&lt;p&gt;In cPanel, open &lt;strong&gt;SSL/TLS&lt;/strong&gt; then &lt;strong&gt;Manage SSL Sites&lt;/strong&gt;. Some hosts put the same screen under &lt;strong&gt;SSL/TLS Status&lt;/strong&gt; with an &lt;em&gt;Install an SSL certificate&lt;/em&gt; button. You paste the domain, the certificate, the key and the CA bundle into their own fields, then install.&lt;/p&gt;

&lt;p&gt;Order matters inside the certificate field when a host asks for a single combined box: your certificate first, then the bundle underneath it. Reversing them produces an error that reads like a bad key.&lt;/p&gt;

&lt;p&gt;On hPanel, Plesk or a custom panel the labels differ, but the three inputs are always the same three things.&lt;/p&gt;

&lt;h2&gt;
  
  
  Verify, then force HTTPS
&lt;/h2&gt;

&lt;p&gt;Reload the checker or rerun the &lt;code&gt;openssl&lt;/code&gt; command. The subject, issuer and dates should now be yours.&lt;/p&gt;

&lt;p&gt;Then redirect plain HTTP:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight apache"&gt;&lt;code&gt;&lt;span class="nc"&gt;RewriteEngine&lt;/span&gt; &lt;span class="nc"&gt;On&lt;/span&gt;
&lt;span class="na"&gt;RewriteCond %{HTTPS} !&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;on&lt;/span&gt;
&lt;span class="na"&gt;RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;301&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Expect mixed content next. A page can be served over HTTPS and still show as insecure because one image, font or script is requested over &lt;code&gt;http://&lt;/code&gt;. The fix is to update those references, not to disable the warning. On WordPress that usually means a database search and replace from &lt;code&gt;http://example.com&lt;/code&gt; to &lt;code&gt;https://example.com&lt;/code&gt;; use a tool that handles serialized data, or the site's settings will break in confusing ways. Check the browser console after the change, because a single hard-coded &lt;code&gt;http://&lt;/code&gt; URL in a theme is easy to miss and hard to spot by eye.&lt;/p&gt;

&lt;h2&gt;
  
  
  Plan the renewal before you need it
&lt;/h2&gt;

&lt;p&gt;A ninety-day certificate is a file with a date on it, not a subscription. Renewal means doing this whole install again unless something automates it for you. Put the expiry date somewhere you actually look, with a reminder two weeks out, and check the chain again around day sixty rather than the day it dies.&lt;/p&gt;

&lt;p&gt;If your host offers AutoSSL, turn it on and confirm it is really running on your domain. If it does not, and you have more than a couple of sites, the honest answer is that manual installation is a fallback, not a strategy: at some point a date will pass while you are busy with something else, and the first person to notice will be a customer.&lt;/p&gt;

&lt;h2&gt;
  
  
  When the manual path is the right one
&lt;/h2&gt;

&lt;p&gt;Manual installation earns its place in a few situations: a single site on a host without automation, a migration where DNS and hosting are temporarily split, a wildcard for an internal tool, or a host whose automated renewal keeps failing validation for reasons you cannot see. In those cases the sequence above is the whole job, and doing it once by hand teaches you exactly which step the automation is getting wrong.&lt;/p&gt;

</description>
      <category>ssl</category>
      <category>webdev</category>
      <category>security</category>
      <category>hosting</category>
    </item>
    <item>
      <title>Running a High-Volume News Site on WordPress: What Actually Causes Trouble</title>
      <dc:creator>Adam Reeves</dc:creator>
      <pubDate>Sat, 05 Dec 2026 18:21:01 +0000</pubDate>
      <link>https://dev.to/adamreeves_dev/running-a-high-volume-news-site-on-wordpress-what-actually-causes-trouble-5ec</link>
      <guid>https://dev.to/adamreeves_dev/running-a-high-volume-news-site-on-wordpress-what-actually-causes-trouble-5ec</guid>
      <description>&lt;p&gt;I run &lt;a href="https://uae-daily.com" rel="noopener noreferrer"&gt;uae-daily.com&lt;/a&gt;, a WordPress news and guides site for a UAE audience, mostly in Arabic. It is new, so this is not a post about scaling to millions of visits. It is about the problems that show up first when you publish a lot, very fast, on ordinary WordPress hosting. The advice is general enough to apply to your own site.&lt;/p&gt;

&lt;h2&gt;
  
  
  Publishing throughput is a database and cron problem
&lt;/h2&gt;

&lt;p&gt;The first thing that happened is that a large batch of posts went live in one evening, and more were scheduled across the following days. Two parts of WordPress matter here.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scheduled posts depend on WP-Cron.&lt;/strong&gt; WP-Cron does not run on a clock. It runs when someone visits the site, so a quiet period can leave a scheduled post sitting at "Missed schedule". The fix is to turn off the visitor-triggered behavior and call it from a real scheduler:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="c1"&gt;// wp-config.php&lt;/span&gt;
&lt;span class="nf"&gt;define&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'DISABLE_WP_CRON'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;*/5 * * * * curl -s https://example.com/wp-cron.php?doing_wp_cron &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /dev/null 2&lt;span class="o"&gt;&amp;gt;&amp;amp;&lt;/span&gt;1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every five minutes is a good starting point for a site that schedules many posts per day. If your host offers a cron panel, use it. If not, any external uptime service that can hit a URL on a timer will do the job.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Every publish triggers work.&lt;/strong&gt; Saving a post fires hooks: sitemap regeneration, cache purges, ping services, search index updates, and whatever your plugins add. Publish fifty posts at once and that work stacks up. Before a large batch, deactivate plugins that do nothing for the batch (social auto-posters are the usual offenders), and keep an eye on how long a single publish request takes. If one save takes seconds, a bulk import will time out.&lt;/p&gt;

&lt;p&gt;If you create posts through code or the REST API, send them in small groups instead of one huge request. Smaller groups are easier to retry, and a failed request leaves you with a clean list of what is missing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Caching and page speed on modest hosting
&lt;/h2&gt;

&lt;p&gt;Shared or entry-level hosting has little CPU and RAM to spare, so the goal is simple: PHP should run as rarely as possible for anonymous visitors.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Full-page caching first.&lt;/strong&gt; A page cache that serves static HTML turns most requests into a file read. This one change matters more than anything else on this list.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A persistent object cache if the host supports it&lt;/strong&gt; (Redis or Memcached). Without it, WordPress repeats the same database queries on every uncached request.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cache the right things for news.&lt;/strong&gt; Home pages and category archives change whenever you publish. Set a short lifetime for them, or purge them on publish, but keep individual articles cached for much longer. A stale article page is rarely a problem, while a stale home page that hides your newest post is.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Images are the heavy part.&lt;/strong&gt; Resize to the display size before upload, serve WebP, and lazy-load everything below the fold. Do not lazy-load the largest image at the top of the page, because that is usually the element that determines your Largest Contentful Paint.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Watch plugin weight.&lt;/strong&gt; Each plugin that loads CSS and JavaScript on every page costs you. Check the network tab on a plain article page and remove scripts that nothing on that page uses.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Measure with real tools: Lighthouse for a lab check, and the Core Web Vitals report in Google Search Console for field data. Field data takes weeks to appear on a new site, so do not panic over an empty report early on.&lt;/p&gt;

&lt;h2&gt;
  
  
  Arabic content in WordPress
&lt;/h2&gt;

&lt;p&gt;Arabic works well in WordPress, but a few details need attention.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;RTL support in the theme.&lt;/strong&gt; A theme needs proper RTL stylesheets and should set &lt;code&gt;dir&lt;/code&gt; from the site language. If you build your own theme, test with &lt;code&gt;is_rtl()&lt;/code&gt; and mirror margins, floats, and icons. Padding that looks right in LTR will look wrong without this.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Slugs.&lt;/strong&gt; WordPress will happily create percent-encoded Arabic slugs. They work, but they look terrible when copied into chat apps and logs. Pick one policy for the whole site (Arabic slugs or short transliterated English ones) and keep to it. Changing it later means redirects.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fonts.&lt;/strong&gt; Arabic web fonts can be large. Subset them, use &lt;code&gt;font-display: swap&lt;/code&gt;, and avoid loading four weights when two will do.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Database collation.&lt;/strong&gt; Use &lt;code&gt;utf8mb4&lt;/code&gt;. Older installs on &lt;code&gt;utf8&lt;/code&gt; can mangle some characters, and this is painful to fix after thousands of posts exist.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mixed-language content.&lt;/strong&gt; If you add English to an Arabic site, decide early whether it lives in the same install with a multilingual plugin or in a separate one. Either choice works. Switching mid-way is expensive. Whichever you pick, set &lt;code&gt;hreflang&lt;/code&gt; correctly and make sure each language version links to its counterpart.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Search.&lt;/strong&gt; The default WordPress search handles Arabic poorly, especially with diacritics and letter variants such as different forms of alef. If search matters on your site, plan for it.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Keeping SEO intact at high volume
&lt;/h2&gt;

&lt;p&gt;Publishing quickly makes it easy to publish carelessly. A few checks catch most of the damage:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;One canonical URL per article.&lt;/strong&gt; Check that tag pages, date archives, and attachment pages are not creating thin duplicates. Most SEO plugins let you noindex low-value archives.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sitemaps that stay current.&lt;/strong&gt; Make sure the sitemap index is listed in &lt;code&gt;robots.txt&lt;/code&gt; and submitted in Search Console. After a batch publish, open the sitemap and confirm the new URLs are in it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Internal links.&lt;/strong&gt; Every new article should link to at least a couple of related articles, and should receive links from existing ones. Orphan pages are slow to get crawled. A simple habit works: when you publish, search your own site for the topic and add links both ways.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unique titles and descriptions.&lt;/strong&gt; Template-generated titles repeated across dozens of posts look like duplication. If your titles are produced from a pattern, add something specific to each one.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Status codes after cleanup.&lt;/strong&gt; If you delete drafts or merge duplicates, redirect old URLs with a 301 instead of leaving 404s.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Indexing takes time.&lt;/strong&gt; A new domain can take days or weeks to be crawled well. Request indexing for key pages in Search Console, but do not expect an instant result.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What I would do first on a new publishing site
&lt;/h2&gt;

&lt;p&gt;If you are setting up something similar to &lt;a href="https://uae-daily.com" rel="noopener noreferrer"&gt;UAE Daily&lt;/a&gt;, this is the order I would follow:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Move WP-Cron to a real scheduler.&lt;/li&gt;
&lt;li&gt;Install a page cache, test it logged out, and test that publishing purges the right pages.&lt;/li&gt;
&lt;li&gt;Decide Arabic slug policy, language setup, and collation before importing content.&lt;/li&gt;
&lt;li&gt;Set up the sitemap, robots rules, and Search Console.&lt;/li&gt;
&lt;li&gt;Publish a small batch first, check timing, cache, and sitemap, and then scale up.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The common thread is that every problem here is cheaper to prevent than to repair. A missed schedule, a stale home page, or a slug policy you regret all stem from decisions made in the first week.&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>webdev</category>
      <category>seo</category>
      <category>performance</category>
    </item>
    <item>
      <title>What Actually Happens When an SSL Certificate Expires (and How to Automate Renewal)</title>
      <dc:creator>Adam Reeves</dc:creator>
      <pubDate>Sat, 05 Dec 2026 17:12:37 +0000</pubDate>
      <link>https://dev.to/adamreeves_dev/what-actually-happens-when-an-ssl-certificate-expires-and-how-to-automate-renewal-2ema</link>
      <guid>https://dev.to/adamreeves_dev/what-actually-happens-when-an-ssl-certificate-expires-and-how-to-automate-renewal-2ema</guid>
      <description>&lt;p&gt;Most certificate outages are boring. Nobody attacked anything and nothing was misconfigured in the usual sense. A date passed, and a file that was valid yesterday stopped being valid today. Still, the effects are loud, so it helps to know exactly what breaks, how to see it coming, and how to make renewal something you never think about.&lt;/p&gt;

&lt;h2&gt;
  
  
  What actually happens when a certificate expires
&lt;/h2&gt;

&lt;p&gt;A TLS certificate carries a "not after" timestamp. During the handshake, the client checks that the current time falls inside the validity window, along with the chain of trust and the hostname. When the time is past "not after", the handshake itself can still complete, but the client treats the certificate as invalid and decides what to do next.&lt;/p&gt;

&lt;p&gt;For browsers, that means a full-page warning such as &lt;code&gt;NET::ERR_CERT_DATE_INVALID&lt;/code&gt;. Users can usually click through, but most will not, and you cannot assume they should. Search crawlers and link previews generally give up too.&lt;/p&gt;

&lt;p&gt;For everything that is not a browser, it is worse, because there is no click-through at all:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;curl&lt;/code&gt; fails with &lt;code&gt;SSL certificate problem: certificate has expired&lt;/code&gt; and a non-zero exit code.&lt;/li&gt;
&lt;li&gt;Node.js throws &lt;code&gt;CERT_HAS_EXPIRED&lt;/code&gt;, Python's &lt;code&gt;requests&lt;/code&gt; raises &lt;code&gt;SSLError&lt;/code&gt;, and Go returns &lt;code&gt;x509: certificate has expired or is not yet valid&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Webhooks from payment providers or Git hosts quietly stop being delivered, because the sender refuses to talk to your endpoint.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Notice that one expired certificate on an API hostname can break far more than the website. The marketing site may be fine while checkout, login, and every integration are down.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it keeps happening
&lt;/h2&gt;

&lt;p&gt;Certificates used to last years, so renewal was a rare manual job that lived in one person's calendar. Public certificates now have much shorter lifetimes. Let's Encrypt issues 90-day certificates, and the wider industry has been moving toward shorter validity periods. The short lifetime is deliberate: it limits the damage from a leaked key and pushes everyone to automate.&lt;/p&gt;

&lt;p&gt;The catch is that automation fails silently. A cron job runs as the wrong user, a DNS record changes so the challenge fails, a firewall rule blocks port 80, or the renewal works but the web server never reloads and keeps serving the old certificate from memory. That last one is the classic. The file on disk is new, and the process is still using the old one.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Check what you are actually serving
&lt;/h2&gt;

&lt;p&gt;Do not trust the file on disk. Ask the server what it presents:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; openssl s_client -connect example.com:443 -servername example.com 2&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;/dev/null \
  &lt;span class="o"&gt;|&lt;/span&gt; openssl x509 -noout -subject -issuer -dates
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;-servername&lt;/code&gt; flag matters. Without it, a server hosting several sites may hand back its default certificate and you will check the wrong one. The output shows &lt;code&gt;notBefore&lt;/code&gt; and &lt;code&gt;notAfter&lt;/code&gt;, so you can see the real expiry date and compute days left in whatever tooling you use.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Alert well before the deadline
&lt;/h2&gt;

&lt;p&gt;A check that only fires on the day of expiry is useless. Pick thresholds that match how fast your team can react. A reasonable pattern with 90-day certificates is a warning at 21 days and a page at 7 days. If automatic renewal normally happens at around 30 days left, then anything under 21 days means renewal has already failed at least once, and you have time to fix it calmly.&lt;/p&gt;

&lt;p&gt;Some options for running the check:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A scheduled CI job that runs the script above against every public hostname and fails when &lt;code&gt;days&lt;/code&gt; drops below your threshold.&lt;/li&gt;
&lt;li&gt;Prometheus with the blackbox exporter, which exposes &lt;code&gt;probe_ssl_earliest_cert_expiry&lt;/code&gt; that you can alert on.&lt;/li&gt;
&lt;li&gt;A hosted uptime monitor that includes certificate expiry checks.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Whatever you pick, make the list of hostnames come from somewhere real, such as your DNS zone or your load balancer config. The certificates that expire are rarely the ones on the main site. They are on &lt;code&gt;staging.&lt;/code&gt;, &lt;code&gt;api-old.&lt;/code&gt;, &lt;code&gt;mail.&lt;/code&gt;, and the hostname a partner integration uses that nobody remembers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Automate renewal properly
&lt;/h2&gt;

&lt;p&gt;If you run your own servers, an ACME client is the standard answer. Certbot, acme.sh, Caddy, and Traefik all speak the same protocol. Caddy and Traefik handle issuance and renewal themselves. With Certbot on a typical Linux box:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sudo certbot certonly --webroot -w /var/www/html -d example.com -d www.example.com
sudo certbot renew --dry-run
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The dry run is the important part. It exercises the entire renewal path against the staging environment, so you find broken challenges today instead of in 60 days. Most distributions install a systemd timer or cron entry for &lt;code&gt;certbot renew&lt;/code&gt;, but check that it exists with &lt;code&gt;systemctl list-timers | grep certbot&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Then deal with the reload problem. Renewal that does not restart the server is not renewal. Use a deploy hook:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sudo certbot renew --deploy-hook &lt;span class="s2"&gt;"systemctl reload nginx"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A reload is enough for nginx and Apache, and it does not drop connections. Put the hook in your renewal config so it runs every time, not only when you remember it.&lt;/p&gt;

&lt;p&gt;A few other things that regularly break automation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;HTTP-01 challenges&lt;/strong&gt; need port 80 reachable from the internet. A new firewall rule or a blanket HTTP-to-HTTPS redirect at the wrong layer can block it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Wildcard certificates&lt;/strong&gt; require the DNS-01 challenge, which means your DNS provider needs an API and a token with limited permissions. Token rotation is a common cause of failed renewals.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 4: Have a recovery plan
&lt;/h2&gt;

&lt;p&gt;Even with all of that, plan for the day it fails anyway. Write down, in the repository, the exact commands to issue and install a certificate by hand for each critical hostname. Know where the private keys live and who can restart the service. The worst time to learn that only one person has the DNS credentials is during an outage.&lt;/p&gt;

&lt;p&gt;If you need a certificate quickly and do not want to set up a client first, a browser-based generator can get you a valid Let's Encrypt certificate to install manually. For example, &lt;a href="https://tryfreessl.com" rel="noopener noreferrer"&gt;tryfreessl.com&lt;/a&gt; walks through the domain validation and hands you the files. That is a stopgap for emergencies and small sites, not a replacement for automated renewal on anything that matters.&lt;/p&gt;

&lt;p&gt;Expired certificates are one of the few outages that are completely predictable. The date is printed on the certificate. If you check it, alert on it, and test your renewal before you need it, the day it expires will pass without anyone noticing, which is exactly what you want.&lt;/p&gt;

</description>
      <category>ssl</category>
      <category>devops</category>
      <category>security</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
