Avoid multiple redirects when using www.
-
Since Cloudron is handling the redirects, I don't think it would be efficient to do in the .htaccess for every site.
Based on this Google Pagespeed report for
http://marcusquinn.com
which will be the first try for anyone typing in a domain:Compared to:
In reference to these articles:
- https://www.yes-www.org/why-use-www/
- https://www.danielmorell.com/guides/htaccess-seo/redirects/https-www-and-trailing-slash
- https://www.danielmorell.com/guides/htaccess-seo/sample-code/redirect-sample-code#https-www-files
It seems this generator would be good for the default setup when
www.
is the Main location:For example::
My website if you're interested in my ramblings on technology too
:
Will do a proper write-up post on Cloudron once I'm happy with my setup
-
Good point. If i understand correctly, you want
http://foo.com
to redirect tohttps://www.foo.com
directly. FWIW, because of redirect caching + HSTS this just a one time thing (atleast for that user+browser) -
replied to girish on last edited by marcusquinn
@girish Yes please
Same principles would be equally valuable to those using Ghost / Wordpress / Surfer for their
www.
site.Might be worth a note in the Docs too with a link to the above commentary on the reasons for choosing to use
www.
as it would help make high-availability multi-Cloudron setups possible, where you can have multiple CNAME IPs for a subdomain but not the naked root domain AFAIK. -
I have fixed this for the next release (5.6). Thanks for reporting.
-
I simply add www for most apps because too many people are used to type this before reaching their destination.
But from reading this thread I'm even more confused ?I thought dropping www was not such bad idea, a bit a useless remain from when hosting was hard? I may be completely wrong but I really want to understand what's the best thing to do, certainly if it impacts SEO etc...
-
replied to rmdes on last edited by
@rmdes I think from a user point of view it just needs to work with either, they don't really care as long as typing results in what they were hoping for. From a Sys Admin point of view, www. is more flexible for scaling and high-availability setups. As an example, if you use Odoo enterprise, it must be www. for the websites.