WebCareShelf guide
How to Check Your Website's TLS Certificate Expiration
This guide provides a practical walkthrough for small business owners and freelance web builders to manage SSL/TLS certificates. It covers the consequences of expiration, methods for checking dates via browsers and command lines, and a structured maintenance routine.
Key takeaways
- Expired certificates cause browser warnings and break secure connections.
- Use the padlock icon in browsers for a quick visual check of expiration dates.
- Use OpenSSL commands in the terminal to get precise certificate data directly from the server.
- Establish a 30-day warning window to handle renewals without rushing.
- Maintain a list of all domains and their expiry dates to manage multiple sites effectively.
Understanding the Impact of an Expired Certificate
A TLS (Transport Layer Security) certificate is the foundation of security for any website using 'https'. It encrypts data between the visitor's browser and your server, ensuring that sensitive information like login credentials or payment details remains private. When this certificate expires, the connection is no longer considered secure by modern web standards.
If a certificate expires, most modern web browsers will display a prominent warning page to any visitor attempting to access the site. This warning often includes messages about 'not secure' connections and may block the user from entering the website entirely. For a small business, this can result in a significant loss of trust and traffic, as customers are unlikely to bypass security warnings to complete a purchase or contact the company.
Beyond just a visual warning, an expired certificate can break internal functions. APIs that rely on secure connections may stop communicating with your site, and email services associated with the domain might experience delivery issues if they rely on valid certificates for authentication. Monitoring these dates is a critical component of basic web maintenance.
- Loss of visitor trust due to 'Not Secure' warnings
- Potential blockages of website access by major browsers
- Interruption of API calls and backend communication
- Possible issues with secure mail server authentication
Checking Expiration via a Web Browser
The quickest way to check your certificate status is through the browser you use for daily management. While the interface varies between different browsers, the underlying data remains consistent. This method is useful for a quick check but does not provide technical details like the issuing authority or specific intermediate chains.
To check via a browser, navigate to the homepage of your site (e.g., example.com). Look at the address bar where the URL is displayed. Most browsers show a padlock icon next to the domain name. Clicking on this icon typically opens a certificate menu.
In this menu, look for a section labeled 'Certificate' or 'Connection is secure.' Within that view, you will find the 'Valid From' and 'Valid To' dates. Note the expiration date clearly. If the date is approaching within the next 30 days, it is time to initiate a renewal process.
- Navigate to your site in any modern browser
- Click the padlock icon in the address bar
- Select 'Connection is secure' or 'Certificate' from the dropdown
- Locate the 'Valid To' date in the certificate details
Checking Expiration via Terminal Commands
For a more technical and precise check, using a terminal or command line interface is often more reliable. This method bypasses browser caching and provides raw data directly from the server's response. This is useful for developers who need to verify certificates quickly without opening a web page.
The OpenSSL tool is standard on many systems and can be used to pull certificate information. By running a specific command, you can see the exact expiration date in a readable format. If you are using Windows, these commands can be run in Git Bash or WSL (Windows Subsystem for Linux).
When the output is displayed, look for the 'notAfter' line; this represents the expiration date of the certificate. This method is helpful when managing multiple sites from a single terminal window.
If the command returns an error or fails to show a date, it may indicate that the server is not configured correctly or that the site is unreachable. If the certificate shows as valid but very close to expiring, you should proceed with your renewal routine immediately.
- Open your terminal or command prompt
- Run the specific OpenSSL command provided below
- Identify the 'notAfter' line in the output
- Verify that the certificate is valid for the specific subdomain you are using
openssl s_client -connect example.com:443 -servername example.com </dev/null 2>/dev/null | openssl x509 -noout -datesKey Metrics to Monitor
When reviewing your certificate, there are a few key pieces of information beyond just the expiration date that can help you manage your site's health. Understanding these ensures that the renewal process goes smoothly.
The first metric is the 'Issuer'. This tells you which authority provided the certificate. Knowing this helps identify where to go if you need to contact support or update account details during a renewal. The second is the 'Subject Alternative Name' (SAN). This lists all the subdomains covered by a single certificate. If your site uses multiple subdomains, ensure they are all listed here.
Finally, pay attention to the 'Common Name'. This should match your primary domain exactly. While these details don't change daily, checking them during your monthly maintenance ensures that your setup remains consistent.
- Expiration Date: The most critical date for site uptime
- Issuer: The entity that verified and issued the certificate
- Subject Alternative Name (SAN): List of subdomains covered by one cert
- Common Name: The primary domain name on the certificate
Establishing a Renewal Routine
Because manual checks are easy to forget, establishing a consistent routine is the best way to prevent an expired certificate from taking your site offline. A proactive approach involves setting reminders well in advance of the expiration date.
Create a calendar notification for 30 days before the 'Valid To' date. This gives you a full month to navigate any hurdles with your hosting provider or certificate authority. If you use an automated system, verify that the auto-renewal feature is active and that your payment method on file is current.
Regarding validity periods, maximum lifetimes for certificates are getting shorter; you should check with your specific provider to confirm their current allowed limits. For sites managed manually, perform a check once a month. Create a simple spreadsheet listing all your domains and their respective expiration dates. This allows you to see at a glance which sites need attention in the coming weeks.
- Set an automated calendar alert for 30 days before expiry
- Verify auto-renewal settings with your hosting provider or CA
- Create a maintenance log for all domains and subdomains
- Perform a manual check of the certificate every 30 days
openssl s_client -connect example.com:443 -servername example.com </dev/null 2>/dev/null | openssl x509 -noout -dates