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

📅 October 10, 2026 👁️ 11

In the action list for switching to HTTPS, the certificate is just the first step. What truly determines whether the switch is clean is changing four types of addresses together: the redirection rules from old addresses to new addresses, the absolute addresses hardcoded within the site, the files submitted to search engines, and the configuration of pseudo-static and standard addresses. The result of installing only the certificate is usually that old protocol addresses are still accessible, warnings of mixed content appear on pages, and the sitemap still shows the old protocol——leaving tails for both inclusion and access. The reasonable sequence is: certificate and listening, unified redirection, bulk replacement, update the list, and review mixed content.

Step 1: Certificate and service listening

Run the new protocol first and then discuss changing the address. Check three things: whether the certificate-covered domain name includes both the naked domain and the version with www; whether the protocol configuration on the front-end service is correct; whether the application layer needs to perceive the original protocol. Common deployment methods of AnQiCMS (Baota panel and aaPanel, LNMP command deployment, Docker image) all configure certificates on the front-end Nginx, and the application listens to port 8001 by default, so the protocol change mainly falls on the front-end service and background configuration, rather than changing the code.

After this step is done, visit the new address once using an incognito window to confirm that the certificate chain is complete and there are no degradation prompts.

Second step: How to configure redirection for the old address.

Redirects should be closed off according to rules, not handled page by page. The goal is to have only one entry point for the same content: from http to https, from naked domain to www (or reverse), completed in one go, without any double jumps. AnQiCMS backend provides 301 redirect management, used to set URL redirection, configure the combination rules of protocols and domain names here, which is easier to verify than writing rules at multiple locations.

Three details:

  • The homepage and inner pages should be covered. Redirecting only the homepage is a common oversight, as old addresses with paths are still accessible under the old protocol.
  • Use 301 instead of temporary redirects. Protocol switching is a permanent change, while temporary redirects will cause search engines to continue to retain the old addresses.
  • The redirected address should point to a standard address to avoid mutual loops with the standard address configuration.

Step three: batch replacement of absolute addresses within the site.

Old protocol addresses hardcoded in the text and templates are the main source of mixed content warnings. Range control is more important than speed during batch processing.

The AnQiCMS full-site replacement tool can batch replace keywords or links, suitable for replacing batch absolute addresses of old protocols in the text. Three points to note: first, limit the replacement scope (category or column), to avoid changing the same strings that legally appear in the text; make a backup before replacing, and check several articles after replacing; the hard-coded addresses in the navigation and single-page pages will not take effect with the batch replacement of the text, and need to be opened separately to modify the navigation settings and single-page management one by one.

The image and attachment address should also be checked. The absolute address of the materials with protocol in the historical articles should be replaced, and several pages should be checked to confirm that the resources can be loaded, to avoid the image not displaying.

Step 4: The list-type files should be changed together

The list submitted to search will not change protocols automatically, and the generated results need to be confirmed.

The site map (sitemap) is automatically generated by the system, and it is important to check whether the addresses within it are already in the new protocol and whether they are consistent with the redirection direction of the new configuration. If the list still contains old addresses, the crawling program will have to take an extra step each time, which is not conducive to the unification of addresses in the long run. AnQiCMS supports automatic generation of site maps, and after switching, it can be regenerated and checked once.

If the site map address is referenced in Robots.txt, it should also be updated synchronously; at the same time, check for any rules remaining for old protocols. AnQiCMS supports robots configuration, and it should be checked once in text format after modification.

Static page and standard address should be confirmed at this step: AnQiCMS supports static page rule management, can customize static page URL, the rule itself does not contain a protocol, but the protocol in the list and standard address should be consistent with the new entry.

Fifth step: Review mixed content and residue

Three easy-to-miss places:

  • Templates that reference third-party scripts and font addresses will trigger mixed content blocking directly if they are written with the old protocol, resulting in style disarray or partial interaction failure.
  • External link images with protocols in comment and rich text historical content.
  • Form submission address and API call address: if the interface base address in the front-end script is set to the old protocol, the submission will fail.

Verification method is simple and reliable: after switching, open several typical pages (home page, column list, article details, form page), check the browser's security prompts for each page, and check a page with an old protocol to confirm that it jumps to the new address once.

Common questions

Should the old address be retained for a period of time to be accessible?Retained but only in the form of a redirect. If the old address returns content directly, it will form two entries. If the old address returns 404, it will harm the existing external links and收录.

What should be done if the main text cannot be changed completely?Prioritize the processing of list-type files and redirect rules; the batch replacement of the main text can be promoted by categories; as long as the redirection and standard address are unified, the impact of un-replaced absolute addresses is controllable.

Will the inclusion drop if the protocol changes?In the short term, the old address is redirected to the new address, which is a normal transition. Regenerating the site map and keeping the new content push running in the link push management are two actions to shorten the transition period.

How long will it take to confirm the completion of the switch?When all the old protocol addresses are redirected at one time, there are no mixed content warnings on the page, and both the sitemap and robots are the new protocol, it can be considered that the internal actions are completed, and the remaining observations are left to the indexing data.

Related articles

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

The default validity period of the HTTPS certificate is ninety days, and renewal should not wait until the browser alarms. Automatic renewal should be as a fixed scheduled task in the deployment process, after the certificate is issued and before the service is reloaded, and it is recommended to trigger once every sixty days. To confirm that it has been renewed, you need to check the actual expiration date of the online certificate, and also check the old address redirection and mixed content, and keep a backup before changing the certificate.

2026-10-10

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

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

Where is the backend entry of the online experience station, and which capabilities should be verified during the trial?

The information and backend entry path of the experience station are written in the documentation, and the demonstration account is in the README demonstration area. This article provides a 30-minute trial list: content model and columns, AI dialogue and toolset, skill and intent directory, access and approval, included related modules, and explain which conclusions should not be obtained from the experience station.

2026-10-11