﻿<head><script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4357510538660394"
     crossorigin="anonymous"></script></head>URL: /rules/security/https

---
title: "HTTPS: what it means when a page is not served over HTTPS"
description: "A page delivered over plain HTTP can be read and rewritten in transit. squirrel flags every crawled URL whose protocol is not https."
---

## What HTTPS is

HTTPS is HTTP carried inside a TLS connection. It encrypts the request and the response, and it proves to the browser that the server holding the certificate is the one that owns the hostname. Without it, anything between the user and the server can read the page and change it before it arrives.

It is not optional infrastructure any more. Browsers mark plain HTTP pages as not secure, block most powerful web APIs on them, and Google treats HTTPS as a ranking signal. Certificates are free from Let's Encrypt and issued automatically by most hosts.

## What squirrel checks

The rule parses the URL of each crawled page and emits a single check named `https`:

- Fail when the parsed protocol is anything other than `https:`. Report message: `Page not served over HTTPS`, with the page's actual protocol as the value and `https:` as the expected value. Severity error.
- Pass when the protocol is `https:`. Message: `Page served over HTTPS`.
- Fail when the URL cannot be parsed at all. Message: `Invalid URL format`, with the raw URL as the value.

The check is per-page, so a site that has migrated but still links to a handful of `http://` URLs internally shows those pages individually rather than one site-wide verdict.

On a local or private-network host, such as `localhost` or `192.168.1.10`, the rule is skipped and left out of the score, because a dev server is not the production edge. See [Transport and delivery rules do not apply](/guides/local-audits-cli#transport-and-delivery-rules-do-not-apply).

## How to fix it

```nginx
server {
  listen 80;
  server_name example.com;
  return 301 https://example.com$request_uri;
}
```

Issue a certificate, serve the site on 443, then send a permanent redirect for every HTTP URL. After the switch, update internal links, canonical tags and the sitemap to the `https://` form, and re-audit for mixed content.

| | |
|---|---|
| **Rule ID** | `security/https` |
| **Category** | [Security](/rules/security) |
| **Scope** | Per-page |
| **Severity** | error |
| **Weight** | 8/10 |

## Enable / disable

### Disable this rule

```toml squirrel.toml
[rules]
disable = ["security/https"]
```

### Disable all Security rules

```toml squirrel.toml
[rules]
disable = ["security/*"]
```

### Enable only this rule

```toml squirrel.toml
[rules]
enable = ["security/https"]
```

`enable` replaces the default `["*"]`, so this is the only rule selected. Leave `disable` out: a rule that matches any `disable` pattern is skipped even when `enable` names it. Only an `enabled` setting under a rule's own `[rule_options]` table overrides both lists.

## Check names by outcome

Each check name this rule can emit, by what it means to a tool comparing two audits. A **problem** check is a finding. A **clean** check says the rule ran over what it covers and found nothing; it clears the problem checks listed beside it, so a finding is fixed when the rule ran over the same scope and a clean check took its place. A **not checked** check says the rule did not evaluate, and never clears a finding.

{/* rule-checks:start */}

| Check name | Outcome | Clears |
| --- | --- | --- |
| `https` | Problem |  |
| `https` | Clean | `https` |

{/* rule-checks:end */}

## Related rules

- [security/http-to-https](/rules/security/http-to-https): whether the HTTP versions of your URLs redirect to HTTPS at all.
- [security/hsts](/rules/security/hsts): the header that stops the browser from trying HTTP again.
- [security/mixed-content](/rules/security/mixed-content): HTTPS pages that still pull assets over HTTP.
- [links/https-downgrade](/rules/links/https-downgrade): internal links that point back at `http://`.

Security findings ship in every audit next to the SEO, performance and agent experience rules. See [Website security scan with AI](https://squirrelscan.com/learn/audit-website-security-with-ai) for how an agent works through a report.

{/* glossary:backlinks:start */}

Glossary: [HTTPS](/glossary/https).

{/* glossary:backlinks:end */}

## References

- [HTTPS, MDN glossary](https://developer.mozilla.org/en-US/docs/Glossary/HTTPS)
- [Why HTTPS matters, web.dev](https://web.dev/articles/why-https-matters)
- [Transport Layer Security, MDN implementation guide](https://developer.mozilla.org/en-US/docs/Web/Security/Practical_implementation_guides/TLS)

## Check your site

Run `squirrel audit https://nutshop.squirrelscan.com` and open the Security section of the report. Every page that is not served over HTTPS is listed by page. Signed-out local audits need no account and cost nothing. Signed-in audits spend credits.

<CardGroup cols={2}>
  <Card title="Install squirrel" icon="terminal" href="/quickstart">
    One command to install, one to run your first audit.
  </Card>
  <Card title="See a samp