Knowledge Base
Categories: Windows Plesk
How to Redirect Visitors to the Secure URL - Plesk
This article assumes that you have already ordered an SSL Certificate.
To automatically redirect visitors to the Secure URL:
- Log in to your Plesk Control Panel.
- Click Website & Domains.
- Click File Manager for the website you want to redirect.
- Click on the web.config file.
- Click Edit in Code Editor.
- Add the following code after <system.webServer>:
<configuration> <system.webServer> <rewrite> <rules> <rule name="Redirect to HTTPS" stopProcessing="true"> <match url="(.*)" /> <conditions> <add input="{HTTPS}" pattern="off" /> </conditions> <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Permanent" /> </rule> </rules> </rewrite> </system.webServer> </configuration>
- Click OK.
All visitors to your website should now be redirected to the secure URL https://example.com.
* Your feedback is too short