Alex Morgan
Alex Morgan
Senior Hosting Analyst
10+ years testing web hosting infrastructure. Benchmarks servers across 4 continents.

如何安装SSL证书 2026

An SSL certificate is no longer optional. It's required. Google marks sites without SSL as "Not Secure", payment processors mandate it, and search engines use HTTPS as a ranking signal. The good news: free SSL certificates are available to everyone via Let's Encrypt, and most modern hosts install them automatically. This guide covers both the automatic method (one click) and manual installation for hosts that require more hands-on setup.

我们如何核对文中步骤

发布前,若步骤依赖主机商,我们会在至少两家平台各走一遍;否则在同一环境隔日执行两次。我们记录控制台报错、不同地区的界面文案差异,并在厂商调整按钮位置后立即更新文案。路径与截图每季度抽检。涉及 DNS、SSL 或付款时,我们确认回滚/补救选项,并链接到官方文档以获取权威表述。

  1. 1

    Step 1: Check if SSL is already installed

    Visit your site at https://yourdomain.com. If you see a padlock icon in the browser address bar, SSL is already active. If you see a "Not Secure" warning, you need to install or activate SSL. Log into your hosting control panel. many modern hosts (Hostinger, SiteGround, Bluehost) activate Let's Encrypt SSL automatically on all new accounts.

  2. 2

    Step 2: Activate free SSL via your hosting control panel (fastest method)

    Most hosts include free Let's Encrypt SSL. In cPanel: go to Security → SSL/TLS → Manage SSL sites, or look for an "SSL" icon in the main cPanel dashboard. In Hostinger's hPanel: go to Hosting → Manage → SSL. In SiteGround: Security → SSL Manager. Click "Install" or "Activate" next to your domain. The certificate installs in under 2 minutes.

  3. 3

    Step 3: Force HTTPS. redirect all HTTP traffic to HTTPS

    After SSL is installed, visitors who type yourdomain.com (without https) still reach the unencrypted version. Force HTTPS via cPanel (Force HTTPS Redirect toggle) or by adding redirect rules to your .htaccess file: `RewriteEngine On` / `RewriteCond %{HTTPS} off` / `RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]`. In WordPress, update Settings → General: change both site URL and WordPress URL to https://.

  4. 4

    Step 4: Fix mixed content warnings

    After enabling HTTPS, some pages may show a "Not Secure" warning despite having SSL. This is caused by mixed content: images, scripts, or stylesheets still loading via http://. Use the Better Search Replace plugin to update all http:// URLs in your WordPress database to https://. Or use Really Simple SSL plugin which handles this automatically. Check for mixed content using Chrome DevTools (Console tab) or SSL check tools like whynopadlock.com.

  5. 5

    Step 5: Test SSL installation

    Use SSL Labs (ssllabs.com/ssltest/) to run a full SSL quality test. aim for an A or A+ rating. Verify: the padlock appears on all pages, there are no mixed content warnings in browser DevTools, the certificate expiry date is at least 60+ days away (Let's Encrypt auto-renews every 90 days), and your site redirects properly from http:// to https://.

  6. 6

    Step 6: Update external references and Google Search Console

    Update any external links or directory listings you control to use https:// URLs. In Google Search Console, add your https:// version as a separate property if you haven't already, and set it as the preferred domain. Submit an updated sitemap from your https:// URL. Google will gradually re-crawl your site over the following weeks and transfer any existing search rankings to the https:// version.

1
Hostinger Top Pick
Hostinger has survived multiple yearly cycles on our bench: LiteSpeed, hPanel, and sub-$3 intro pricing still deliver the best overall value for most sites we migrate.
★★★★½
✓ 优点
  • Certificates and auto-renew work the same way in repeat tests on Hostinger.
  • Fast LiteSpeed loading, consistent in our repeated tests.
  • Good storage, SSL, and backups on entry plans, no forced add-ons at login.
✕ 缺点
  • Check certificate chains and mixed content after Hostinger issues a cert.
  • No phone support on any plan.
月价格$2.99
存储空间100 GB SSD
免费域名✓ 是
在线时间99.9%
2
Namecheap Best Value
Portfolios and Stellar/EasyWP have lived here for years: renewals stay readable, WHOIS privacy is included, and the combo still undercuts most 'domain + host' bundles we price out.
★★★★½
✓ 优点
  • Certificates and auto-renew work the same way in repeat tests on Namecheap.
  • Clear renewal pricing, easy to track across a large domain portfolio.
  • Free WHOIS privacy on registrations and transfers.
✕ 缺点
  • Check certificate chains and mixed content after Namecheap issues a cert.
  • Not the fastest host. Plan caching and a CDN for speed-critical sites.
月价格$1.98
存储空间20 GB SSD
免费域名✓ 是
在线时间99.9%

常见问题

Is a free SSL certificate as good as a paid one?+
For most websites, yes. Free Let's Encrypt certificates provide the same 256-bit encryption as paid certificates. Paid certificates add organisation validation (OV) or extended validation (EV) that display your company name in the browser. useful for high-value financial or enterprise sites but unnecessary for most business websites.
How often does SSL need to be renewed?+
Let's Encrypt certificates expire every 90 days. All reputable hosts auto-renew them via automated scripts (certbot). You should receive email warnings if auto-renewal fails. Paid certificates typically have 1-year terms.
Does SSL affect my Google rankings?+
Yes, HTTPS is a confirmed Google ranking signal since 2014. While it's a lightweight signal compared to content quality, sites without SSL are penalised and may show warnings in Chrome that increase bounce rates. indirectly further hurting rankings.