To enable HSTS using .htaccess use below code
Header set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
A breakdown of the header:
Strict-Transport-Security
Forces HSTS on the domain
max-age
How long the header should be active in seconds
includeSubDomains
Includes subdomains
preload
Authorizes preload listing if eligible (covered below)
After that To submit your domain for preloading, visit HSTSpreload.org
admin Edited question September 22, 2023