Instagram Widget

WordPress Redirect HTTP to HTTPS in Apache

If you have WordPress on Apache server and you want to redirect all your http URL to https URL, you can do this via editing .htaccess file. This is a recommend method for WordPress.

Follow below steps:

1. Open .htaccess file

2. Add below lines of code and save it.

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

That's it now you can see your website redirected to https.

Post a Comment