In short
- HTTPS has been a lightweight Google ranking signal since 2014; the real gain is visitors who never see a security warning.
- Free DV certificates provide the same encryption as paid ones. Certificate lifetimes are getting shorter, so always automate renewal.
- Configure the server with the full chain (
fullchain.pem), not just the certificate; a missing intermediate certificate breaks the connection on some devices. - Start HSTS with a short
max-ageand raise it step by step to one year;includeSubDomainsandpreloadare decisions that are hard to undo. - Test CSP first with
Content-Security-Policy-Report-Only. Security headers aren't ranking signals, but a CSP that breaks the page can affect your visibility.
Why do you need HTTPS?
On a page served over HTTP, forms, passwords and cookies travel across the network in plain text; someone on the same Wi-Fi network or a provider along the way can read them and inject ads or malicious code into the page. HTTPS encrypts the connection with TLS, and the certificate confirms that the browser is really talking to your server.
- Browsers: current browsers flag http:// pages as insecure in the address bar, and Chrome spells it out with a “Not secure” label. With an HTTPS-first mode turned on, a site that doesn't offer HTTPS triggers a warning before the page opens.
- Modern features: browsers only use HTTP/2 and HTTP/3 over HTTPS, and features such as geolocation, the camera and service workers also require HTTPS.
- Analytics: under the browsers' default policy, no referrer is sent when a visitor goes from an HTTPS site to an http:// site. If your site is on http://, some of the visitors who arrive from other sites show up as direct traffic in your analytics.
- Google: in 2014 Google announced that it had started using HTTPS as a lightweight ranking signal, and its page experience documentation still mentions HTTPS. When the same content is available over both protocols, Google prefers the HTTPS version as canonical unless other signals conflict.
The direct ranking benefit of HTTPS is small. The real SEO risk runs the other way: an expired certificate, or one issued for the wrong name, triggers a full-page security warning, visitors turn back and most bots can't reach the site.
SSL/TLS certificates: which type, and where to get one?
“SSL certificate” is the name that stuck; today connections use TLS, the protocol that replaced SSL. A certificate is a signed document in which a certificate authority (CA) confirms that the domain is under your control. The types differ not in encryption strength but in what gets verified:
| Type | What is verified? | When? |
|---|---|---|
| DV (domain validated) | That you control the domain, via a DNS record, a file on the server or an email. | Most sites, including blogs, company sites and online shops. |
| OV (organization validated) | The company's existence, in addition to the domain. | Corporate use where the organization's details should appear in the certificate. |
| EV (extended validation) | The company, using more extensive documentation. | Since 2019 the major browsers no longer show EV certificates differently in the address bar. |
Single-name, multi-name and wildcard certificates
The names a certificate covers are listed in its Subject Alternative Name (SAN) field. A single certificate can cover several names, such as ornek-site.com and www.ornek-site.com. A wildcard certificate (*.ornek-site.com) covers only one level of subdomains: blog.ornek-site.com yes, but not a.b.ornek-site.com or ornek-site.com itself. If you also need the bare domain, add it to the certificate separately.
Free certificates
Let's Encrypt, ZeroSSL and Google Trust Services issue free DV certificates automatically through the ACME protocol. Most hosting control panels install them in one click, and platforms such as Cloudflare, Vercel and Netlify obtain and renew certificates on their own. A paid DV certificate doesn't provide stronger encryption.
With ACME, a wildcard certificate requires DNS validation (DNS-01): the certificate authority reads a TXT record added under the name _acme-challenge. If your domain has a CAA record, the issuing authority must be listed there, or no certificate is issued; see the domain and DNS guide for details.
Certificate lifetimes are getting shorter
Under a decision adopted by the CA/Browser Forum in 2025, the maximum validity of public certificates has been 200 days since March 15, 2026; it drops to 100 days in 2027 and to 47 days in 2029. If renewal isn't automated, sooner or later it gets forgotten. Let's Encrypt also stopped sending expiry reminder emails in 2025, so monitor the expiry date yourself.
Renewal, certificate chains and common errors
Most certificate problems surface at renewal time. If you installed certbot from a package, a timer (a systemd timer or cron job) was installed too, and it attempts renewal when 30 days remain. Check the timer, whether renewal would succeed and the expiry dates with these commands:
systemctl list-timers | grep certbot
sudo certbot renew --dry-run
sudo certbot certificates
Common reasons renewal breaks: port 80, which HTTP validation (HTTP-01) needs, has been closed, or a rule blocks the /.well-known/acme-challenge/ path; country blocking (the certificate authority validates from several locations); and the web server not being reloaded after renewal. In the last case the new certificate sits on disk while the server keeps serving the old one; use certbot's --deploy-hook to reload the server after renewal.
Serve the full chain
The browser wants to see an unbroken chain from the server certificate up to a root certificate it trusts. If the server doesn't send the intermediate certificate that signed its own, some desktop browsers fill the gap themselves, but Android devices, curl and some bots reject the connection. That's why the problem slips through with “it works for me”. In Nginx the ssl_certificate line, and in Apache 2.4.8 and later the SSLCertificateFile line, should point to fullchain.pem, not cert.pem.
What does the SSL certificate checker look at?
The SSL certificate checker connects to port 443 on your site and inspects the certificate the server sends. The 100-point score has seven parts: trust chain 30, domain name match 15, time remaining 15, TLS version 15, key and signature 10, HSTS 10 and HTTP/2 5 points. 90 and above is an A, 80–89 a B, 65–79 a C, 50–64 a D, 35–49 an E, and anything lower an F. If there's a problem that triggers a browser warning (untrusted chain, name mismatch, expired certificate), the total is capped at 30 and the grade is F. Common findings:
- Intermediate certificate missing: the chain problem described above; configure the full chain on the server.
- The certificate doesn't cover this domain: the certificate was issued for other names, or the wrong certificate is being served for one of the sites on the same IP address (an SNI setting). The tool also tries the other name, with or without www; if that name exists in DNS and is covered neither by this certificate nor by a separate certificate of its own, it warns about that too.
- Time remaining: 30 days or less until expiry produces a warning, 14 days or less a critical finding. A certificate whose automatic renewal works never drops to the critical threshold; if it has, renewal has stopped.
- Old TLS version: the tool shows the version negotiated in the handshake; if it shows TLS 1.0 or 1.1, the server doesn't support anything newer.
See your certificate's chain, time remaining, TLS version and HSTS setting in a single report.
SSL certificate checkerHow to find and fix mixed content
Mixed content is when a page opened over https:// loads resources such as images, scripts, stylesheets or iframes over http://. It's the most common problem after moving to HTTPS, because the old URLs in templates and in the database don't change by themselves.
- Active mixed content (scripts, stylesheets, iframes,
fetchrequests) is blocked outright by browsers; the layout breaks and menus and forms stop working. - For passive mixed content (images, audio, video), current versions of Chrome and Firefox first try loading the same URL over https://, and don't load it if that fails.
How to find it
- Check the Console tab in the browser's developer tools; every blocked or upgraded resource is listed with a “Mixed Content” warning.
- The page audit lists the http:// resources in the HTML under the “Insecure (http) resources” finding; if they include scripts, stylesheets or iframes, the finding is critical. For the whole site, a site crawl shows every affected page and the number of resources.
- These checks look at
srcattributes and stylesheet links in the HTML; for URLs requested from inside CSS or JavaScript and forsrcsetlists, use the console.
How to fix it
Change your own URLs. Rewrite http://ornek-site.com URLs in templates and content with https:// or as root-relative paths (/assets/logo.png); protocol-relative URLs (//ornek-site.com/…) are an outdated technique.
Update the database in WordPress. After switching the two addresses on the Settings › General screen to https://, replace the old URLs in posts and settings with a search-and-replace tool. With WP-CLI, run it in dry-run mode first and leave the guid column untouched:
wp search-replace 'http://ornek-site.com' 'https://ornek-site.com' --skip-columns=guid --dry-run
wp search-replace 'http://ornek-site.com' 'https://ornek-site.com' --skip-columns=guid
Third-party resources and a temporary fix. Replace any provider that doesn't offer HTTPS, or host the file on your own server. The Content-Security-Policy: upgrade-insecure-requests header tells the browser to request http:// resources over https://, but a resource that isn't served over https:// still won't load.
HSTS: tell the browser to use HTTPS only
Even with a redirect to HTTPS in place, the first request goes out unencrypted when a visitor types ornek-site.com; an attacker in the middle can intercept it and keep the connection on the unencrypted version (SSL stripping). The Strict-Transport-Security header tells the browser to open this domain only over HTTPS for a set period:
Strict-Transport-Security: max-age=31536000; includeSubDomains
max-age: the duration in seconds;31536000is one year, andmax-age=0deletes the entry.includeSubDomains: the rule also applies to every subdomain.preload: states that you want the domain added to the list built into browsers (see below).
Browsers honor the header only on an HTTPS response with a valid certificate; HSTS added to an http:// response is ignored. HSTS also removes the redirect step for returning visitors: the browser rewrites the request to https:// before it reaches the server. In Chrome's developer tools you'll see this as a “307 Internal Redirect”; details in the redirect guide.
Turn on HSTS step by step
- Confirm that every http:// URL goes to its https:// version with a 301.
- Start with
max-age=300(5 minutes); if something goes wrong, browsers forget the rule quickly. - If nothing breaks, raise the duration to a week (
604800), then a month (2592000) and finally a year (31536000). - Add
includeSubDomainsonce you're sure all your subdomains (webmail panel, test server, old applications) support HTTPS; a subdomain without HTTPS will no longer open for visitors who have received the header.
The preload list: hard to undo
HSTS only works after a visitor has opened the site over HTTPS once. The preload list closes that gap too: domains on the list are built into the browser. Chrome maintains the list, and the lists of the other major browsers are based on it. hstspreload.org requires a valid certificate, http:// requests redirected to https:// on the same host, HTTPS on every subdomain, and an HTTPS response on the root domain with a max-age of at least one year plus includeSubDomains and preload.
Leaving the list is possible, but it can take months for the change to reach users through browser updates. Only choose preload if you're sure the domain and all its subdomains will stay on HTTPS for good; for most sites, a one-year HSTS policy with includeSubDomains is enough.
Security headers and recommended values
Security headers limit how the browser loads your page and how it interacts with other sites. The table shows the headers scored by the HTTP header checker, a good starting value for each and their points out of 100:
| Header | What does it do? | Starting value | Points |
|---|---|---|---|
Strict-Transport-Security | Makes the browser open the site over HTTPS only. | max-age=31536000; includeSubDomains | 25 |
Content-Security-Policy | Limits where scripts, styles and other resources can be loaded from (XSS protection). | Site-specific; see below. | 25 |
X-Frame-Options or frame-ancestors | Stops the page from being opened inside an iframe on other sites (clickjacking). | SAMEORIGIN | 15 |
X-Content-Type-Options | Stops the browser from guessing the file type. | nosniff | 10 |
Referrer-Policy | Sets how much of the URL is shared when visitors move to other sites. | strict-origin-when-cross-origin | 10 |
Permissions-Policy | Limits access to browser features such as the camera, microphone and location. | camera=(), microphone=(), geolocation=() | 10 |
Set-Cookie attributes | Keeps cookies from being sent over unencrypted connections and hides them from JavaScript. | Secure; HttpOnly; SameSite=Lax | 5 |
Grades run A+ (95 and above), A (85), B (70), C (55), D (40), E (25) and F. A page that doesn't use HTTPS can get a D at most, because headers can be altered in transit over an unencrypted connection. Of the 25 points for HSTS, 20 are for a max-age of at least 6 months (10 for a shorter one) and 5 for includeSubDomains.
Content-Security-Policy: the most effective header, and the one that needs the most care
CSP stops a script injected into the page (XSS) from running. Directives are written per resource type: default-src sets the default, script-src limits scripts, img-src images, and connect-src fetch and measurement requests. A simple starting policy:
Content-Security-Policy: default-src 'self'; script-src 'self' https://cdn.ornek-site.com; img-src 'self' data: https:; style-src 'self' 'unsafe-inline'; object-src 'none'; base-uri 'self'; frame-ancestors 'self'
Analytics and ad scripts usually need several domains; add the list from the provider's documentation to the script-src, connect-src and frame-src directives. The values that trigger the tool's “CSP is present, but script rules are lax” finding are 'unsafe-inline', 'unsafe-eval' and broad sources such as *, https: and data: in the script sources. Allow inline scripts with a nonce that changes on every request ('nonce-…') or a hash of their content ('sha256-…').
Test with Report-Only first
An enforced CSP can silently block a font or a payment form you forgot about. Publish the policy first under the name Content-Security-Policy-Report-Only: the browser blocks nothing, writes violations to the console and, if you like, reports them to an address. The reporting address is defined with the Reporting-Endpoints header and the report-to directive; for older browsers you can add report-uri as well:
Reporting-Endpoints: csp="https://ornek-site.com/csp-rapor"
Content-Security-Policy-Report-Only: default-src 'self'; img-src 'self' data: https:; object-src 'none'; base-uri 'self'; report-to csp; report-uri /csp-rapor
Once no violations from legitimate sources remain, rename the header to Content-Security-Policy. The HTTP header checker gives a page with only a Report-Only policy 5 points out of 25. You can also define CSP in the HTML with a <meta http-equiv> tag, but frame-ancestors and the reporting directives don't work in that tag.
Other headers
Framing: in clickjacking, your page is placed inside an invisible iframe on another site and visitors are tricked into clicking without realizing it. X-Frame-Options: SAMEORIGIN allows framing only on your own site, and DENY doesn't allow it at all. CSP's frame-ancestors directive is more flexible, and when both are present it's the one that applies. The old ALLOW-FROM value is no longer supported; to allow a specific site, write frame-ancestors 'self' https://ortak-site.com.
nosniff: stops the browser from running a file served with the wrong type as a script. When you add it, make sure file types are sent correctly: a JavaScript file served as text/plain will no longer run.
Referrer-Policy: strict-origin-when-cross-origin sends other sites only your domain, not the page path; it's also the default in modern browsers. With no-referrer, the sites you link to can't see that visitors came from you; unsafe-url sends the full URL even to unencrypted sites.
Permissions-Policy: limits the use of features such as the camera, microphone and location by the page and the third-party iframes inside it; turn off the features you don't use with an empty list such as camera=(). It replaces the old Feature-Policy header.
X-XSS-Protection has no effect in modern browsers; don't add it, or set it to 0. Hide headers that reveal software versions, such as Server: nginx/1.24.0 or X-Powered-By: PHP/8.2; the HTTP header checker shows them in the “Information leakage” section.
Don't define the same header in two layers (both at the CDN and on the server). With multiple HSTS headers the browser applies only the first; with multiple CSP headers it applies all of them together, so a second policy can block resources the first one allows.
Which headers affect SEO directly?
Security headers and the headers that affect SEO often sit in the same configuration file, but they do different jobs.
| Header or setting | SEO effect |
|---|---|
| HTTPS and a valid certificate | Direct: a lightweight ranking signal, and HTTPS is preferred when choosing the canonical URL. An invalid certificate cuts off access. |
Status code and Location | Direct: redirects and 4xx and 5xx responses decide which URL stays in the index. |
X-Robots-Tag | Direct: a noindex value removes the page from the index even if the HTML has no such tag. |
Link: rel="canonical" | Direct: declares the preferred URL; it must not contradict the canonical tag in the HTML. |
ETag and Last-Modified | Indirect: with conditional requests (304), unchanged pages aren't downloaded again and crawl resources are used efficiently. |
| HSTS | No effect on rankings; removes the redirect step for returning visitors. |
CSP, X-Frame-Options, nosniff, Referrer-Policy, Permissions-Policy | Google doesn't name these as ranking signals; their job is security. If they're written in a way that breaks the page, there's an indirect effect. |
CSP is the most common example of an indirect effect. Googlebot renders pages with an up-to-date version of Chromium; on a site that loads its content with JavaScript, a policy that blocks a necessary script can leave the page Google sees empty as well. Before enforcing a CSP, test your important pages with the live test in Search Console's URL Inspection tool.
An X-Robots-Tag: noindex left over from a CDN, plugin or test-environment setting, on the other hand, is easy to miss because it doesn't appear in the HTML. The HTTP header checker shows it as a critical finding in the “SEO and indexing” section; also try it with the Googlebot (smartphone) user agent.
Score your page's security headers and get ready-made Nginx and Apache lines for whatever is missing.
HTTP header checkerNginx, Apache, Cloudflare, Vercel and Netlify examples
The examples are written for ornek-site.com and start CSP in Report-Only mode; test them in a staging environment first.
Nginx
server {
listen 443 ssl;
listen [::]:443 ssl;
http2 on;
server_name ornek-site.com;
ssl_certificate /etc/letsencrypt/live/ornek-site.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/ornek-site.com/privkey.pem;
ssl_protocols TLSv1.2 TLSv1.3;
server_tokens off;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
add_header Permissions-Policy "camera=(), microphone=(), geolocation=()" always;
add_header Content-Security-Policy-Report-Only "default-src 'self'; img-src 'self' data: https:; object-src 'none'; base-uri 'self'; frame-ancestors 'self'" always;
}
always makes sure the header is also sent with error responses. If a location block has its own add_header line, the ones in the parent block aren't inherited there; repeat the lines in that block. http2 on; works in Nginx 1.25.1 and later; older versions use listen 443 ssl http2;. After any change, test with nginx -t and reload.
Apache
<VirtualHost *:443>
ServerName ornek-site.com
Protocols h2 http/1.1
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/ornek-site.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/ornek-site.com/privkey.pem
SSLProtocol -all +TLSv1.2 +TLSv1.3
Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"
Header always set X-Frame-Options "SAMEORIGIN"
Header always set X-Content-Type-Options "nosniff"
Header always set Referrer-Policy "strict-origin-when-cross-origin"
Header always set Permissions-Policy "camera=(), microphone=(), geolocation=()"
Header always unset X-Powered-By
</VirtualHost>
The Header directives require mod_headers, and Protocols h2 requires mod_http2. On shared hosting you can put the Header lines in the .htaccess file in your site's root directory, while ServerTokens Prod, which hides the version, only works in the main configuration.
Cloudflare
Set the SSL/TLS encryption mode to “Full (strict)”. In “Flexible” mode, traffic between Cloudflare and your server is unencrypted, and a redirect loop can form with the HTTPS redirect on your server. http:// requests are redirected by the “Always Use HTTPS” setting; HSTS and the minimum TLS version are in the edge certificate settings of the SSL/TLS section. You can add other headers with Response Header Transform Rules.
Vercel and Netlify
Vercel and Netlify obtain and renew certificates themselves and redirect http:// requests to HTTPS. On Vercel, extra headers go in the headers section of the vercel.json file:
{
"headers": [
{
"source": "/(.*)",
"headers": [
{ "key": "X-Frame-Options", "value": "SAMEORIGIN" },
{ "key": "X-Content-Type-Options", "value": "nosniff" },
{ "key": "Referrer-Policy", "value": "strict-origin-when-cross-origin" },
{ "key": "Permissions-Policy", "value": "camera=(), microphone=(), geolocation=()" }
]
}
]
}
Netlify uses the _headers file at the root of the published folder; indented lines apply to the path above them:
/*
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Frame-Options: SAMEORIGIN
X-Content-Type-Options: nosniff
Referrer-Policy: strict-origin-when-cross-origin
Platforms may send some headers on their own. After deploying, check in the “Response headers” list of the HTTP header checker that each header appears only once.
Moving to HTTPS, and a checklist
- Get the certificate and confirm with the SSL certificate checker that it covers both the www and the non-www name.
- Clean up mixed content: switch the URLs in templates, the database and third-party resources to https://.
- Redirect every http:// URL to the https:// version of the same path in a single step, with a 301.
- Update internal signals: canonical and hreflang tags, the sitemap, structured data and internal links should all point to the https:// URL.
- In Search Console, use a property that covers the https:// version (a domain property covers both protocols) and resubmit the sitemap. A protocol change doesn't need the Change of Address tool.
- Add the security headers: first a short-lived HSTS and a Report-Only CSP, then permanent values if nothing breaks.
Checklist
- The certificate is trusted, its chain is complete and it covers all of the site's names; renewal is automatic and the last test succeeded.
- TLS 1.2 and 1.3 are enabled; TLS 1.0 and 1.1 are disabled.
- No resources are loaded over http:// on your pages.
- HSTS is at least 6 months, ideally a year;
includeSubDomainsonly if every subdomain is ready. - CSP has been tested with Report-Only; the other security headers appear once in responses, with the right values.
- Responses contain no unwanted
X-Robots-Tag: noindex.
Frequently asked questions
Will HTTPS improve my rankings?
A little. Google has used HTTPS as a lightweight ranking signal since 2014; content and relevance matter far more. Its main contribution is indirect: visitors who see no security warning, and the URL that's preferred when the canonical is chosen.
Is a free SSL certificate good enough?
For most sites, yes. Free DV certificates from authorities such as Let's Encrypt provide the same encryption as paid ones and are valid in every browser. What a paid certificate adds is organization validation, support and a warranty.
How do I get rid of a mixed content warning?
Find the resources loaded over http:// through the Mixed Content warnings in the browser console or a site crawl, and change their URLs to https:// or root-relative paths. In WordPress, update the old URLs in the database with a search-and-replace tool.
Should I join the HSTS preload list?
Only if you're sure all your subdomains will stay on HTTPS for good; a decision to leave the list can take months to reach browsers. For most sites, a one-year HSTS policy is enough.
Will CSP break my site?
It can if you enforce it straight away: analytics, font or payment scripts the policy doesn't allow get blocked. Publish the policy first as Content-Security-Policy-Report-Only, fix the violations, then enforce it.
Do security headers affect SEO?
CSP, X-Frame-Options, nosniff, Referrer-Policy and Permissions-Policy aren't headers that Google names as ranking signals; the ones that affect SEO directly are X-Robots-Tag, the Link header declaring a canonical, and status codes. Still, a CSP that blocks the scripts that load your content can break the page Google sees.
Related guides and tools
- SSL certificate checker: scores the chain, time remaining, TLS version and HSTS setting.
- HTTP header checker: grades your security headers and gives Nginx and Apache lines for whatever is missing.
- Redirect checker: confirm that the http:// and www versions reach HTTPS in a single step.
- Redirect guide: moving from http to https, 301 rules and the browser's HSTS 307.
- Domain and DNS guide: CAA records and the role of DNS in certificate validation.
- DNS lookup: see your domain's CAA records.
- Technical SEO checklist: audit your other server-level settings.
- SEO guides: all the guides on Röntgen.