Skip to content

HSTS check for preload directive does not look at policies for TLDs and public suffixes #16680

@ide

Description

@ide

FAQ

URL

https://expo.dev

What happened?

Lighthouse will report, "No preload directive found" for a website that includes strict-transport-security: max-age=31536000; includeSubDomains in its response headers. This makes sense at first glance because there is no preload directive. However, some TLDs (like .app, .dev) and public suffixes are already in the HSTS preload list and therefore any domain underneath them automatically requires HTTPS -- the website doesn't need its own HSTS policy let alone the preload directive.

Relevant code:

title: 'Use a strong HSTS policy',

What did you expect?

Ideally Lighthouse would check the HSTS preload policy for the TLD or public suffix of the website being tested.

What have you tried?

No response

How were you running Lighthouse?

Chrome DevTools

Lighthouse Version

12.6.1

Chrome Version

Version 139.0.7258.157 (Official Build) (arm64)

Node Version

No response

OS

macOS 15.6.1

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions