How to force specific pages from http to https

| Last Updated: | In: WordPress, WordPress Beginners, WordPress Snippets


In this tutorial you will know How to force specific pages to be secure, ssl, https. This is very simple & easy snippet to use in your current WordPress website.

It very easy code, you can change this code as per your requirement. Open your functions.php file from your current active wordpress theme.

Add Filter

Below filter will force to redirect your web url from http to https.

Add below snippet in your theme’s functions.php file.


About: Prem Tiwari

Prem Tiwari is the founder of freewebmentor.com and is a professional developer who has vast experience in PHP and open source technologies. Apart from this, he is a blogger by hobby and also he has been a regular speaker of WordPress sessions in various IT Companies.


You may also like:


, , , ,