WordPress Force HTTPS Redirection Without Plugin



My Backlinks are fading. Since I deactivated W3 Total cache and started using WP super cache. The code is not working as before it was. I am getting error “This URL redirected too many times”.
@pradeepkumar @mskian


try this bro

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]


I added this already. No loop. Thanks for answering as I was thinking that it is not working for me.


Is your ‘redirection’ issue fixed @Saurabh_Guttedar bro? :slight_smile:


Yes, It is fixed. Thanks for asking.


the given code is for what? I brought SSL certificate . in google some url are indexed with http. if i use the above code all those urls with http will be redirected to https? what about images?


If this code is working, then that’s all you need, bro. Install “Really Simple SSL” plugin at the end as well. Check my reply on the other thread, please.


Most of them Using Plugin for Force HTTPS Redirection in
Wordpress.Instead of Force SSL Redirect Plugin Use HTACCESS Rule for
Force HTTPS Redirection.

Every time trusting Plugin is Not a Good Idea

Easy to add you can Find the HTACCESS File on your Hosting File
Manager or Add via through Yoast SEO Plugin Yoast SEO > Tools >
File Editor…