The default web address for a domain is:
If I set this as the 'Site Address (URL)' in Wordpress then it seems to take care of the necessary http -> https and non-www -> www redirection on it's own.
The problem is though is that Wordpress redirects the following first:
http://example.com to http://www.example.com
Before this one:
http://example.com to https://example.com
Which means that our HSTS preload status and eligibility is failing which we check here.
We are needing to ensure that the https redirect happens BEFORE the www redirect.
I have no idea how best to do this but I would probably prefer some sort of theme function that hooks into the default functionality and modifies it accordingly.
I did try setting the default site address to
http://example.com and then handling the https and www redirect in the .htaccess but this doesn't seem ideal and can get messy (plus I could only get the https redirect to work and not the www redirect afterwards).
Surely there must be plenty of other HSTS eligible Wordpress websites that use a default
https://www start to the website?