It looks like, by default, Wordpress does two redirects for http://www.example.com -
I agree that’s really broken, and there are two things to note. Firstly, if your WordPress site canonical URL on the Admin > Settings > General page is set to “https://example.com”, you’ll only get one redirect from http://example.com - that is, make sure example.com is used everywhere your website may be advertised.
In Chrome now*, if you just enter “example.com”, it defaults to http://www.example.com. I believe that Chrome is about to change to defaulting to “https://example.com”.
- not sure about the timing and believe this about to change any day now.
So, most of the time, in actual practice, this isn’t even a problem, as there will be one redirect only, especially as Chrome switches to a default of https. It’s important you run your Webpagetests with a URL of “https://example.com” to avoid including redirect times in your tests, and thereby causing confusion.
The second point worth making is that this is easily fixed with explicit rules in your .htaccess file. I suspect you’ll need to craft them manually, just add them. The main thing you need to do is to add a redirect from “http://www.example.com” to “https://example.com” - that is, a single redirect to get in ahead of the default double redirect. There’s no point in adding in a redirect for the https://www.example.com case as WordPress’s default will handle this normally.
Some redirect examples from stackoverflow (one example; there might be better methods but this is simple):
I hope this helps!
ps: another possible .htaccess solution - this redirects anything that is not www.example.com to www.example.com so would need tweaking:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.example.com$ [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
ALSO - worth noting - the TTFB for your site only comes from testing your site with its correct URL. If you are testing with non-correct URLs, you’re not seeing the real TTFB. Always test with the correct, final, official URL - ie the one in Admin>Settings>General.