Certificates are valid for ninety days and automatically renewed, where should this be configured?

📅 October 10, 2026 👁️ 9

The HTTPS certificate has a validity period of ninety days, which is not too long, but also not short enough to be ignored. The official recommendation is to run a renewal task every sixty days, and the cached authorization can be retained for up to thirty days after verification. According to this standard, automatic renewal should be a fixed step in the deployment process, located between 'after the certificate is issued and before the site service is reloaded', triggered by a scheduled task instead of manually handling it when the browser prompts that the certificate is about to expire. The basis for determining whether it is truly renewed is the actual expiration date of the online certificate, not whether there are any errors in the task log.

Why is the certificate only given for ninety days

The short validity period is a trade-off for security: the impact of key leakage is compressed to a few days, and the duration of mistakenly issued certificates is also short. The cost is that the site must treat renewal as a routine operation.For a content management system, this belongs to part of the deployment process, which is at the same level as choosing a server and configuring a domain name. The several deployment methods of AnQiCMS all fall into this category: one-click deployment with Baota panel and aaPanel, LNMP command deployment, Docker image deployment, the application listens to port 8001 by default, and the certificate and redirection are usually handled by the front-end Nginx, and the renewal task is also installed in the host machine's scheduled task.

How early should you start to renew, and how often should you run it

According to the public口径, set the rhythm to: trigger once every sixty days, and consider the thirty days before expiration as a safe margin. The task itself should be idempotent - if the certificate is early, exit directly, and initiate issuance only when it is about to expire. Two details are easy to overlook: first, the verification records have a cache retention period, and repeated applications within a short period of time may not always go through the complete domain name verification; second, the renewal of the certificate does not mean it takes effect, the new file must be loaded by the service process, otherwise the old certificate is still in use online.

Where should the renewal task be placed

Three common locations, sorted by controllability:

The panel layer is the most convenient. The Baota panel and aaPanel's certificate management come with an automatic renewal switch, which is executed by the panel's scheduled task after checking, and both renewal and reload are completed by the panel, suitable for single-site, standard directory structure scenarios.

The host layer is the most controllable. When deploying with commands or LNMP environments, write the renewal script into the root user's crontab, triggered once a day, the script internally judges the remaining days; put the reload at the end of the same script, and ensure that the reload fails and returns a non-zero value, which is convenient for external monitoring to capture.

The container layer is the easiest to fall into pitfalls. When deploying Docker, the certificate file is in the image or mounted volume, if the renewal task runs inside the container, the task and results will be lost when the container is rebuilt. Keeping the task on the host machine, using a volume mounted to share the certificate directory, and reloading through the host layer's proxy service is a more stable combination.

The redirection to check after the certificate is replaced

The old address is still there after the certificate is replaced. Check three places:

  • The redirection from http to https must be unified according to the rules. AnQiCMS backend has a 301 redirect management, which can set URL redirection rules to unify the combination of protocol and bare domain to a standardized address, avoiding the same content appearing at four entrances.
  • Absolute addresses in the page. Old protocol addresses hardcoded in historical articles or templates can cause mixed content, with browsers blocking unsafe resources, resulting in style disorder or images not displaying. The site-wide replacement tool is suitable for such batch replacements, and it is particularly careful to limit the scope before replacement, and be extra careful when modifying navigation and hard-coded addresses in single-page.
  • robots and the address protocol registered in the site map. The protocol also writes the old side, and the side captured is the one that needs to be redirected.

How to confirm that it has really been renewed?

Three steps, from top to bottom in order:

Check the online certificate for the first step. Open the site in the browser to view the certificate details, or use the command on the server to query the expiration date of the peer certificate, and confirm that the date has been extended.Second step, view the task history. The execution record of planned tasks should retain both success and failure results, repeated failures should be detected, AnQiCMS supports email reminders, and such notifications can be sent to the maintainer.Check the rollback capability in the third step. Certificate replacement is an operation that affects the access to the entire site, so it is necessary to leave a backup before the operation. The backup and recovery of AnQiCMS covers data and static files, so if there is a problem, you can roll back according to the backup instead of looking for the certificate file temporarily.

Common questions

Will it be a problem to run the renewal before the certificate expires?The task should be written as idempotent: if there are enough days left, skip directly. Frequent unnecessary applications may trigger rate limiting, so the judgment should be made before the application.

Should I be nervous if the automatic renewal fails once?Check the remaining amount. Under the 60-day rhythm, there is a 30-year safety margin, there is time to make up for a single failure, but continuous failure and no one knows is the risk, so the notification link needs to be independently verified once.

Can the certificate be replaced without redirecting?It can be accessed in the short term, but the old protocol address is still accessible. Two versions will exist in the search results, and the changes will be greater when unifying the mouth later.

Should the renewal task be installed in the container for Docker deployment?Not recommended. The container is a disposable environment that can be rebuilt at any time. The renewal task and execution status should remain on the host layer, and the certificate directory should be shared through a mounted volume.

Related articles

Should compression be done in the program or in the Web server, and should static files be pre-compressed?

Dynamic compression consumes CPU each time a request is made and is limited by minimum length and type list; pre-compression shifts the cost to the publishing stage, sending the existing .gz file directly, but ensuring that the modification time of the original file matches that of the compressed file. The two layers are not substitutes: the content management program is responsible for generation, and the web server is responsible for choosing the sending method based on the client and type, with the help of caching and reverse proxy layers to achieve stable loading speed benefits.

2026-10-09

Static resources added version number still hit the old cache, how should the cache header be written?

Adding version number still hits old files, usually because the response header and filename strategy are not matched: max-age is calculated from the moment the response is generated on the source site instead of the moment it is received, without must-revalidate after expiration, it may continue to reuse outdated copies; s-maxage only manages shared caching and overrides max-age; immutable should be used with version numbers to avoid unnecessary conditional requests. The cache duration for page content and static resources should be configured separately.

2026-10-09

Should the backup take the uploaded images and static files together?

A backup of only the database will leave a very specific gap: after the restore, the article list is still there, but the images, attachments, and static resources in the main text all point to invalid addresses. The scope of a complete backup should cover both data and static files, and regular recovery drills should be conducted. The trash can only cover deleted documents and cannot replace backups; the location relationship of the backup files themselves should also be recorded with the site deployment directory and upload directory.

2026-10-09

When automatic updates are enabled, what is the difference between the default behavior of major and minor versions?

When automatic updates are enabled, there is a big difference in the default orientation between major and minor versions: An official operation manual of a mainstream program states that most sites default to enabling automatic updates, covering four categories: core, plugins, themes, and translation files. Since version 5.6, new installations have default automatic updates for both minor and major versions. For enterprise sites, a more stable compromise is to automatically update minor versions, manually evaluate major versions, and confirm the backup range before the upgrade to include both data and static files.

2026-10-09

Which parts need to be changed when replacing HTTP with HTTPS, including the internal addresses and redirections?

Changing from HTTP to HTTPS is not just about installing certificates. It also involves: the 301 redirect rules for old addresses, hardcoded absolute addresses within the site, the protocol in the sitemap and robots, pseudo-static and standard address configuration, as well as hard-coded links in navigation and single-page applications. The recommended sequence is to first handle certificates and redirects, then perform bulk replacements, and finally update the checklist files and review mixed content.

2026-10-10

After replacing the certificate, the page style is missing half, how to clear the http external links in the https page?

After replacing the certificate, the style is missing half, usually due to the residual http resources in the https page being blocked by the browser. The cleaning order is to first locate the residual references, then batch replace them with internal relative addresses or encrypted addresses according to the main text data, template, and configuration, and finally close the jump rules together.

2026-10-10

Rejected upload returns 413, modify program limit first or modify gateway limit first

When the upload is rejected and returns 413, modify the limit of the gateway layer first, because this status code is returned by the front-end service and the request has not entered the program yet. The sequence is to confirm at which layer the request stops, release the request body limit of the entry layer, and then check the program's own limit. When importing large files in batches, handle them in the same order.

2026-10-10

The recommended operating environment version on the official website is two levels lower than the minimum version that can run, which level should be configured?

In the same requirement page, there are often two levels of running environment numbers: one level suggests the version supported by the host, and one level is the compatible lower limit that can also run. Often followed by a sentence that these versions have entered the official discontinuation of maintenance, which may expose the site to security risks. This article explains what the two levels of numbers mean, why new sites are configured according to the recommended level, and provides a three-step order to check the language runtime, database, and transmission encryption, as well as which restrictions will disappear after switching to the compiled technology stack.

2026-10-10