: Double redirect - implications on performance and cost I recently setup an AWS S3 account and hosted a static site there. I've setup one bucket for the 'www.example.com' and one for the apex
I recently setup an AWS S3 account and hosted a static site there.
I've setup one bucket for the 'www.example.com' and one for the apex domain 'example.com'.
The 'www.example.com' bucket redirects to the 'example.com' bucket.
I have also setup a Cloudflare service which forces https on the domain.
So the chain is: example.com -> example.com -> example.com
Furthermore, I am leveraging CloudFront to distribute content globally to help reduce S3 costs. I've opted to not go the Route53 route, due to costs.
I'm wondering what the performance implications are, in terms of content delivery, as well as what the implications are relating to S3 resource costs, does each request(as per the chain above) equate to a GET.
Is there a better and/or more efficient way of doing this, relating to both cost and performance ? What are best practises to follow in this regard.
More posts by @Kevin317
1 Comments
Sorted by latest first Latest Oldest Best
Double redirects are less efficient:
The browser makes a GET request for each
Each hostname (or subdomain) requires a separated DNS lookup.
In your chain you will have:
3 GET requests
Two DNS lookups (HTTP and HTTPS use the same DNS lookup for example.com)
If it is convenient, it would be better to configure example.com to redirect directly to example.com.
How much worse is it though? Not much. A second redirect adds 10s of milliseconds to the request. I've never used hosting where I pay per GET request. If it is difficult to reconfigure it to a single redirect, I wouldn't worry about it.
Once you get into longer redirect chains, there can be problems. Pretty much everything should follow a chain of five or six redirects. Higher than that and some browsers will throw up errors and search engines bots may give up.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2025 All Rights reserved.