How to redirect immediately to HTTPS://WWW (without redirect chain)

Hi there,

I played around a few hours with different options and could not get it right.

My redirects from http or http://www to https://www work but I have a redirect chain I would love to avoid.

Site: https://www.biohof-bart.at/

What is the right way of setting it up this way?

I know there are several options and I probably just need the right combination of it:

  • Cloudflare > enable/disable force HTTPS
  • Cloudflare > SSL Full
  • Cloudflare > SSL Full (strict) and generating a free TLS certificate signed by Cloudflare to install on my origin Cloudways server
  • Cloudways > enable/disable force HTTPS
  • Cloudways > .htaccess redirect rules

I just could not manage it till now to always directly redirect to https://www

Any idea or instruction on what’s necessary to get the expected result?

Thanks a lot in advance!

Hi @raabmar, I am not sure I’m tracking exactly with what you’re asking.

  • WRT Full or Full (strict), full (strict) is a bit better if you have set up the right cert on your origin.
  • WRT always use https, that is a good setting to enable
  • Cloudways, why? does not seem necessary

WRT always going to https://www, check out the #Tutorials, in particular these two on page rules, Redirect example.com to www.example.com & Redirect www.example.com to example.com . Post back and let us know how it’s going, site looks good to me atm, if you are having issues you may want to try a mobile, incognito, and/or clear cache.

1 Like

Thanks - I will have a look at the additional tutorials.

From what you describe, that is what I tried already. At Cloudways I tried “force HTTPS” enabled & disabled.

If you look at https://redirectdetective.com/ you’ll see that it is not directly getting redirected.

The only way to guarantee a single-redirect:

  1. Disable Always Use HTTPS
  2. Page Rule: Match http://www.example.com/* and set Always Use HTTPS
  3. Page Rule: Match example.com/* and Redirect to https://www.example.com/$1
1 Like

Having a look at those tutorials, I really wonder if I need page rules for such a simple case - all I would need is to forward everything (one single redirect) to https://www.

I remember I played hours around with regex once, thus I try to avoid it as much as I can.

Yesss … that worked!!

I really did not expect that I need page rules for this.

Thanks a lot!

2 Likes

Additionally:

Interestingly, I could enable forced HTTPS as well in Cloudways and it does not have a negative impact. Probably, as Cloudways never must force HTTPS (when only HTTPS traffic reaches cloudways).

I wonder if SSL full (strict) with a Cloudflare certificate is also required in this case. Till now, I always had SSL full (strict) with a Let’s Encrypt certificate from Cloudways and it seemed to work well.

You can live quite comfortably without those page rules. Search Engines will find the canonical URL for your site, then stick with that. Anybody who does a search for your site won’t get any redirects. People who manually type the domain name in won’t notice the speed of the Always Use HTTPS redirect.

I do use a www to naked domain Page Rule because it’s faster than letting my server do it and I’m not running out of Page Rules.

I thought it’s best practice to avoid those redirects. Ahrefs showed it as well, so I thought I must try to fix this. But perhaps you are right, and it does not matter too much.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.