Applicable to:
- Plesk Onyx for Windows
Question
How to create a permanent redirect for MailEnable webmail from HTTP to HTTPS on a Plesk Windows server?
Answer
Note: starting from Plesk Obsidian the HTTPS redirection for webmail is enabled by default.
-
Log into the server via RDP.
-
Go to Start > Windows System > Administrative Tools > Internet Information Services (IIS) Manager > ServerName > Sites > MailEnable WebMail.
-
Press the Bindings button on the left panel:
Click on the screenshot below to expandNote: in the steps №4 and №8 replace
example.com
with the name of the required domain. -
In the appeared window press the Add button and set the following settings:
- Type: http
- IP address: All Unassigned
- Port: 80
- Hostname: webmail.example.com
-
Press the OK and then Close buttons.
-
Press the Explore button in the Actions section:
- In the appeared file explorer window, create a backup for the
web.config
file. -
Open the
web.config
file using any text editor and paste the code below after the<system.webServer>
section:CONFIG_TEXT: <rewrite>
<rules>
<rule name="Redirect to HTTPS" enabled="true" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="off" />
<add input="{HTTP_HOST}" pattern="(webmail)\.example\.com" />
</conditions>
<action type="Redirect" url="https://{C:0}/{R:0}" redirectType="Permanent"/>
</rule>
</rules>
</rewrite> -
Back to Internet Information Services (IIS) Manager > ServerName > Sites > MailEnable WebMail and press the Restart button in the Manage Website section to apply the changes:
Comments
0 comments
Please sign in to leave a comment.