Skip to content

Register now for our Web Enablement Ecosystem webinar!

  • Contact us: +34 944 58 06 58
  • Plesk Partner Program
  • Plesk Lifecycle Policy
  • Blog
  • Contact us
  • Plesk 360
  • Contact us: +34 944 58 06 58
  • Plesk Partner Program
  • Plesk Lifecycle Policy
  • Blog
  • Contact us
  • Plesk 360
  • Solutions
    By Role
    • Developers
    • Content Managers
    • Digital Agencies
    • IT Admins
    • Web Hosters
    • Hyperscalers
    • Developers
    • Content Managers
    • Digital Agencies
    • IT Admins
    • Web Hosters
    • Hyperscalers
    By Edition
    • Web Admin Edition
    • Web Pro Edition
    • Web Host Edition
    • Business & Collaboration
    • Plesk WP Edition
    • Web Admin Edition
    • Web Pro Edition
    • Web Host Edition
    • Business & Collaboration
    • Plesk WP Edition
    By Cloud
    • Amazon Web Services
    • Microsoft Azure
    • Alibaba Cloud
    • GCP Marketplace
    • Vultr
    • DigitalOcean
    • Linode
    • UpCloud
    • Amazon Web Services
    • Microsoft Azure
    • Alibaba Cloud
    • GCP Marketplace
    • Vultr
    • DigitalOcean
    • Linode
    • UpCloud
    Partner Program
    Exclusive discounts, benefits and exposure to take your business to the next level
    Become a partner
    • By Role
      • Developers
      • Content Managers
      • Digital Agencies
      • IT Admins
      • Web Hosters
      • Hyperscalers
    • By Edition
      • Web Admin Edition
      • Web Pro Edition
      • Web Host Edition
      • Business & Collaboration
      • WP Edition
    • By Cloud
      • Amazon Web Services
      • Microsoft Azure
      • Alibaba Cloud
      • GCP Marketplace
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
    • Partner Program
      • Partner Program
  • Product
    Explore Features
    • Everyone
    • Admins & Web Hosters
    • Developers
    • Designers & Agencies
    • Plesk Features
    • Everyone
    • Admins & Web Hosters
    • Developers
    • Designers & Agencies
    • Plesk Features
    Key Topics
    • SocialBee
    • WP Toolkit
    • Sitejet Builder
    • SEO Toolkit
    • Joomla! Toolkit
    • Plesk Premium Email
    • Plesk Email Security
    • SocialBee
    • WP Toolkit
    • Sitejet Builder
    • SEO Toolkit
    • Joomla! Toolkit
    • Plesk Premium Email
    • Plesk Email Security
    Feature Packs
    • Business & Collaboration
    • WP Pack
    • Hosting Pack
    • Power Pack
    • Language Pack
    • Business & Collaboration
    • WP Pack
    • Hosting Pack
    • Power Pack
    • Language Pack
    Featured Extension
    SocialBee
    • Explore Features
      • Everyone
      • Admins & Web Hosters
      • Developers
      • Designers & Agencies
      • Plesk Features
    • Key Topics
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Plesk Premium Email
      • Plesk Email Security
    • Feature Packs
      • Business & Collaboration
      • WP Pack
      • Hosting Pack
      • Power Pack
      • Language Pack
    • Featured Extension
      • Extension
  • Pricing
  • Extensions
  • Help Center
  • More
    • Careers
    • Events
    • Plesk University
  • FREE TRIAL
  • Solutions
    • By Role
      • Developers
      • Content Managers
      • Digital Agencies
      • IT Admins
      • Web Hosters
      • Hyperscalers
    • By Edition
      • Web Admin Edition
      • Web Pro Edition
      • Web Host Edition
      • Business & Collaboration
      • WP Edition
    • By Cloud
      • Amazon Web Services
      • Microsoft Azure
      • Alibaba Cloud
      • GCP Marketplace
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
    • Partner Program
      • Partner Program
  • Product
    • Explore Features
      • Everyone
      • Admins & Web Hosters
      • Developers
      • Designers & Agencies
      • Plesk Features
    • Key Topics
      • SocialBee
      • WP Toolkit
      • Sitejet Builder
      • SEO Toolkit
      • Joomla! Toolkit
      • Plesk Premium Email
      • Plesk Email Security
    • Feature Packs
      • Business & Collaboration
      • WP Pack
      • Hosting Pack
      • Power Pack
      • Language Pack
    • Featured Extension
      • SocialBee
  • Pricing
  • Extensions
  • Help center
  • More
    • Careers
    • Events
    • Plesk University
    • Blog
    • Plesk Partner Program
    • Contact Us
  • FREE TRIAL
  • Solutions
    • By Role
      • Developers
      • Content Managers
      • Digital Agencies
      • IT Admins
      • Web Hosters
      • Hyperscalers
    • By Edition
      • Web Admin Edition
      • Web Pro Edition
      • Web Host Edition
      • Business & Collaboration
      • WP Edition
    • By Cloud
      • Amazon Web Services
      • Microsoft Azure
      • Alibaba Cloud
      • GCP Marketplace
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
    • Partner Program
      • Partner Program
  • Product
    • Explore Features
      • Everyone
      • Admins & Web Hosters
      • Developers
      • Designers & Agencies
      • Plesk Features
    • Key Topics
      • SocialBee
      • WP Toolkit
      • Sitejet Builder
      • SEO Toolkit
      • Joomla! Toolkit
      • Plesk Premium Email
      • Plesk Email Security
    • Feature Packs
      • Business & Collaboration
      • WP Pack
      • Hosting Pack
      • Power Pack
      • Language Pack
    • Featured Extension
      • SocialBee
  • Pricing
  • Extensions
  • Help center
  • More
    • Careers
    • Events
    • Plesk University
    • Blog
    • Plesk Partner Program
    • Contact Us
  • FREE TRIAL

Knowledge Base

How to enable/disable HTTPS redirection for webmail in Plesk for Linux

 
domainsemailgohtaccesshttp

Question

How to enable/disable HTTPS redirection (force webmail to use SSL) for webmail in Plesk for Linux?

Answer

A redirection in Webmail from HTTP to HTTPS on a Plesk for Linux server can be configured either via SSL It! extension, by creating a Plesk custom configuration template, modifying the webmail native configuration file or modifying the webmail .htaccess file:

 

Solution 1:

Using SSL It! extension for a single domain

 

  1. Install the SSL It! extension.

  2. Secure webmail with an SSL certificate.

  3. Go to Domains > example.com > SSL/TLS Certificates >

  4. Under the Options, enable Redirect from HTTP to HTTPS > click Configure > select/deselect Apply to webmail > click on Update to apply the changes.

    mceclip0.png

 

Solution 2:

Disabling redirection to HTTPS via panel.ini for all domains

 

The HTTPS redirection for webmail can be disabled via Plesk configuration file panel.ini for all domains:

  1. Connect to a Plesk server via SSH.

  2. Open the file in an editor:

    # plesk conf panel.ini

    Add the following lines at the end of the file:

    [mail]
    webmail.forceHttp = true

  3. Save the changes and close the file.

 

Solution 3:

Creating a Plesk custom configuration template

 

  1. Connect to a Plesk server via SSH.

  2. Create a directory for custom configuration templates:

    # mkdir -p /usr/local/psa/admin/conf/templates/custom/webmail

  3. Copy the original file webmail.php to the created directory:

    # cp -p /usr/local/psa/admin/conf/templates/default/webmail/webmail.php /usr/local/psa/admin/conf/templates/custom/webmail/

  4. Open the file /usr/local/psa/admin/conf/templates/custom/webmail/webmail.php in a text editor (for example, vi editor) and insert the records below right before the first </VirtualHost> string:

    RewriteEngine On
    RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge/
    RewriteCond %{HTTPS} off
    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,QSA]

  5. Save the changes and close the file.

  6. Regenerate configuration files for all domains:

    Note: During this operation, the websites will be unavailable for a short period of time. The execution time of this command depends on the number of domains on the server.

    # plesk sbin httpdmng --reconfigure-all

    To disable this redirect, remove the /usr/local/psa/admin/conf/templates/custom/webmail/webmail.php file and repeat step 6.

 

Creating a Plesk custom configuration template with Plesk Premium Email

 

  1. Connect to a Plesk server via SSH.

  2. Edit the custom configuration template /usr/local/psa/admin/conf/templates/custom/webmail/roundcube.php created by Plesk Premium Email and locate the following text:

    RewriteEngine On
    RewriteRule ^/[a-zA-Z0-9]{16}/(.*) /$1 [PT,L]

  3. Add the following lines after the text block identified in the previous step:

    RewriteEngine On
    RewriteRule ^/[a-zA-Z0-9]{16}/(.*) /$1 [PT,L]
    # Redirect Kolab from HTTP to HTTPS
    RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge/
    RewriteCond %{HTTPS} off
    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,QSA]

  4. Save the changes and close the file.

  5. Regenerate configuration files for all domains:

    Note: During this operation, the websites will be unavailable for a short period of time. The execution time of this command depends on the number of domains on the server…

Tweet
Share
Share
Email
0 Shares
Read the full article
Related Posts

How to Host a Go App on Plesk

Read More »

Your Complete .htaccess Guide: Including .htaccess Basics and More

Read More »

Exploring Plesk’s Added Value Solutions So Far in 2023

Read More »
Knowledge Base

Websites on Plesk server are slow or show error 500 or PHP mail cannot be sent: ap_pass_brigade failed

Read More »

Unable to issue a Let’s Encrypt certificate for a domain or its mail in Plesk: the DNS challenge used another IP address

Read More »

Let’s Encrypt notification mail: Your certificate (or certificates) for the names listed below will expire in days

Read More »

Email header analysis reports SPF failed for localhost IP on mail sent from Plesk hosted mailbox: SPF Authentication : SPF Failed for IP – 127.0.0.1

Read More »

Hosting Wiki

  • Django
  • RESTful Web Service
  • Server Redundancy
  • Cloud Service Architecture
  • Virtualizor
  • QMAIL
  • Sendmail
  • On-Demand Services
  • Linux Containers
  • Google Cloud CDN
  • htaccess
  • Bare Metal Server
  • Denial of Service
  • PhpMyAdmin
  • phpPgAdmin
  • Red Hat Virtualization
  • Virtuozzo
  • Oracle VM Server
  • Citrix Hypervisor
  • Server Virtualization Software
  • Windows Server
  • Linux
  • Virtualization
  • PHP
  • MongoDB
  • HTTP/3
  • HTTP/2
  • Domain
  • VirtualMin
  • Plesk
  • Lighttpd
  • Web Server
  • DNS Server
  • SSL
  • SSH
  • Email Autoresponder
  • Mailing Lists
  • Email Alias
  • Email Virus Protection
  • Email Forwarding
  • Webmail
  • HTTP

Industry
Partners

industry-partner_ALIBABA
industry-partner_GOOGLEPARTNER
industry-partner_MICROSOFT
industry-partner_REDHAT-r2
industry-partner_ALIBABA
industry-partner_AUTOMATTIC
industry-partner_AWS
industry-partner_DIGITALOCEAN
industry-partner_SCALEWAY
Follow us:
Facebook Twitter Linkedin Youtube Github

COMPANY

About Plesk
Our Brand
Legal
Careers
Impressum

PRODUCT

Pricing 
Extensions
What’s new

KNOWLEDGE BASE

Documentation
Help Center
Migrate to Plesk
Contact Us
Hosting Wiki
Preview releases

PROGRAMS

Contributor Program NEW
Partner Program
Affiliate ProgramNEW

COMMUNITY

Blog
Forums 
Plesk University

First defaul

Company

About Plesk
Our Brand
Legal
Careers
Impressum

PRODUCT

Pricing 
Extensions
What’s new

KNOWLEDGE BASE​

Documentation
Help Center
Migrate to Plesk
Contact Us
Hosting Wiki
Preview releases

PROGRAMS​

Contributor Program NEW
Partner Program
Affiliate ProgramNEW

COMMUNITY​

Blog
Forums
Plesk University

Follow us:
Facebook Twitter Linkedin Youtube Github

© 2025 WebPros International GmbH. All rights reserved. Plesk and the Plesk logo are trademarks of WebPros International GmbH.

Managed with love with Plesk WP Toolkit