Log into your Magento back-end panel -> System -> Configuration.
Click “Web” on the left sidebar -> Secure -> and change Use secure URLs in frontend and in admin.
Hit Save and you are done!
*Note that you must have a private SSL certificate installed on your domain name for this function to work.