Hi there:
I ran Google’s speed tests and they pointed out that multiple redirects were happening just as described in this issue.
When I look at the headers when loading “example.com” there are two redirects:
Request URL: http://example.com
Status Code: 307 Internal Redirect
Response: https://example.com
Request URL: https://example.com
Status Code: 301
Response: https://www.example.com
I would prefer to use a netlify.toml file and currently have the following three redirects but am still seeing 2 redirects instead of just 1. I’m wondering if it has anything to do with the status code being 307? Is something outside my control happening before the redirect rules specified in my .toml file are even considered?
Thanks!
[[redirects]]
from ="http://example.com/*)"
to = "https://www.example.com/:splat"
status = 301
force = true
[[redirects]]
from ="http://www.example.com/*"
to = "https://www.example.com/:splat"
status = 301
force = true
[[redirects]]
from = "https://example.netlify.com/*"
to = "https://www.example.com/:splat"
status = 301
force = true