Forcing Website using https via .htaccess

AsSalam and hi all.


If you have a WordPress website and your hosting already installer with SSL but still when you open your website it did not redirect or use https protocol, here what you can do to forced it use https.


From your cPanle File Manager, navigate to your .htaccess file. If the file not visible, try to enable view the hidden file.

Save it and find your .htaccess file, open to edit.


Its optional but advised to make backup file for your .htaccess.


Write the following code.


Save and clear your browser cache. Try to open your website. It should now redirect and forced to open in https protocol.


If it still not working, try to check either your SSL cert already installed or contact your hosting provider. For me, I always use HostDEWA as my hosting provider and we never experience any problems.

Good luck.