‘Always Use HTTPS’ vs .htaccess rewrite?

I use the above to force https. Would using the setting via Cloudflare and removing the above be a better option?

Thanks!

I am using the free lets encrypt that ICDSoft offers if that makes an impact.

Yes. Using Cloudflare (CF) Always Use HTTPS your client will be redirected at CF edge servers and request doesn’t reach your server, making redirection faster and your server load lower.

3 Likes

Awesome, I’ll remove the .htaccess and enable it on Cloudflare. Thanks!

1 Like

Why remove it from .htaccess?

There is only a minimal advantage of enforcing this at your server if Cloudflare is doing the same, but if you ever bypass Cloudflare for any reason (or make any other configuration change) you’ll still have your desired configuration.

1 Like

Okay, so I should also include it in .htaccess? Won’t that make it try to load SSL twice?

I’ve enabled it. :slight_smile:

Sorry, pretty new to this stuff.

It has no performance consequence since as long as your server is behind CF network those rules are not going to be triggered. They are there just in case you remove CF proxy.

2 Likes

Awesome, thank you for your help! Really appreciate it :smiley:

This topic was automatically closed after 30 days. New replies are no longer allowed.