I have Flexible SSL enabled, with “Always Use HTTPS” enabled. I’m accessing my website using the latest Brave 1.11 (fork of Chromium 83), as well as Chrome 83, via HTTPS.
On my website I have some relative links that do not end in /, such as Contact … note the missing / after /contact.
The site is accessed via HTTPS. When I click that link, the browser requests
https://example.com/contact (note httpS:// and no trailing / in /contact). However, CloudFlare does two 301 redirects for no good (*) reason that I can gather, ending up with 3 GET requests and 3 responses in total instead of just 1 GET request and 1 response.
- the first 301 to http://example.com/contact/ (note the http:// instead of https://, and the added trailing “/” in /contact/)
- the second 301 to https://example.com/contact/ (note the https:// and the trailing / in /contact/)
None of those redirects should have been triggered. I was already on https:// and URLs without trailing / are perfectly fine.
(*) I haven’t kept up to date with all the RFCs but even if there is some draconian-strict specification about URLs and redirects to justify this behavior, I believe it should be relaxed in this case given the extra traffic and latency it causes. Am I missing something?