{"id":2829,"date":"2020-02-27T15:17:17","date_gmt":"2020-02-27T15:17:17","guid":{"rendered":"https:\/\/chemicloud.com\/kb\/?post_type=ht_kb&#038;p=2829"},"modified":"2023-01-12T09:55:44","modified_gmt":"2023-01-12T09:55:44","slug":"force-https-redirect-in-cpanel","status":"publish","type":"ht_kb","link":"https:\/\/chemicloud.com\/kb\/article\/force-https-redirect-in-cpanel\/","title":{"rendered":"How to Use the Force HTTPS Redirect in cPanel"},"content":{"rendered":"<h3 id=\"what-is-https-and-why-should-you-use-it\">What is HTTPS, and why should you use it?<\/h3>\n<p><strong>HTTPS<\/strong>, displayed as a padlock icon in the web browser bar, indicates the SSL protocol is being used to send data between a web server and a website. Any website, especially those that require login credentials, and sensitive data, should use HTTPS.<\/p>\n<h3 id=\"how-does-https-redirection-work\">How does HTTPS redirection work?<\/h3>\n<p>Let&#8217;s say you&#8217;ve just installed an SSL on your website, whether through our one-click Let&#8217;s Encrypt installer or one purchased through your Client Area.<\/p>\n<p>The force HTTPS redirect feature in cPanel allows you to redirect visitors to the secure version of your website automatically.<\/p>\n<h3 id=\"how-to-force-http-to-https-redirect-in-cpanel\">How to force HTTP to HTTPS redirect in cPanel?<\/h3>\n<p>1.\u00a0Go ahead and <a href=\"https:\/\/chemicloud.com\/kb\/article\/how-to-login-cpanel\/\" target=\"_blank\" rel=\"noopener noreferrer\">log in to cPanel<\/a>.<\/p>\n<p>2. Once in the cPanel dashboard, scroll down to the &#8220;Domain&#8221; section and click on the <strong>Domains<\/strong> icon.<\/p>\n<figure id=\"attachment_7613\" aria-describedby=\"caption-attachment-7613\" style=\"width: 783px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-7613 size-large\" src=\"https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2020\/02\/cPanel-Domains-1-783x193.png\" alt=\"cPanel &gt; Domains\" width=\"783\" height=\"193\" srcset=\"https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2020\/02\/cPanel-Domains-1-783x193.png 783w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2020\/02\/cPanel-Domains-1-300x74.png 300w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2020\/02\/cPanel-Domains-1-768x189.png 768w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2020\/02\/cPanel-Domains-1-50x12.png 50w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2020\/02\/cPanel-Domains-1-1536x378.png 1536w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2020\/02\/cPanel-Domains-1-60x15.png 60w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2020\/02\/cPanel-Domains-1-100x25.png 100w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2020\/02\/cPanel-Domains-1.png 1754w\" sizes=\"auto, (max-width: 783px) 100vw, 783px\" \/><figcaption id=\"caption-attachment-7613\" class=\"wp-caption-text\">cPanel &gt; Domains<\/figcaption><\/figure>\n<p>Then the domains interface will appear, where you will see a list of all the domains on your cPanel account. You&#8217;ll see the &#8220;Force HTTPS Redirect&#8221; column.<\/p>\n<p>3. Let&#8217;s locate the domain that you wish to redirect to HTTPS and set the appropriate force HTTPS redirect toggled to on, as in our example:<\/p>\n<figure id=\"attachment_2840\" aria-describedby=\"caption-attachment-2840\" style=\"width: 783px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-2840\" src=\"https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2020\/02\/Force-HTTPS-Redirect-Toggle-On.png\" alt=\"Force HTTPS Redirect &gt; Toggle On\" width=\"783\" height=\"189\" srcset=\"https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2020\/02\/Force-HTTPS-Redirect-Toggle-On.png 2422w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2020\/02\/Force-HTTPS-Redirect-Toggle-On-300x72.png 300w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2020\/02\/Force-HTTPS-Redirect-Toggle-On-1024x247.png 1024w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2020\/02\/Force-HTTPS-Redirect-Toggle-On-768x185.png 768w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2020\/02\/Force-HTTPS-Redirect-Toggle-On-50x12.png 50w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2020\/02\/Force-HTTPS-Redirect-Toggle-On-1536x370.png 1536w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2020\/02\/Force-HTTPS-Redirect-Toggle-On-2048x494.png 2048w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2020\/02\/Force-HTTPS-Redirect-Toggle-On-60x14.png 60w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2020\/02\/Force-HTTPS-Redirect-Toggle-On-100x24.png 100w\" sizes=\"auto, (max-width: 783px) 100vw, 783px\" \/><figcaption id=\"caption-attachment-2840\" class=\"wp-caption-text\">Force HTTPS Redirect &gt; Toggle On<\/figcaption><\/figure>\n<p>A success message will appear.<\/p>\n<p>You can toggle several domains to enable or disable forced HTTPS redirects with the option at the top of the table. Please select the checkbox for each domain and select whether you want to toggle them all on or off.<\/p>\n<p>4. Now, let&#8217;s go back and access your website. Notice how it redirects us to the secure version, and we see a secure lock symbol in the location bar.<\/p>\n<p><b>Struggling with security issues? ChemiCloud is the hosting solution designed with reliability and security in mind! <\/b><span class=\"s1\">\ud83d\udd10<\/span><b> Check out our <\/b><a href=\"https:\/\/chemicloud.com\/pricing#60b65e4e63b58\" target=\"_blank\" rel=\"noopener\"><span class=\"s2\"><b>web hosting <\/b><\/span><\/a><b>plans!<\/b><\/p>\n<p>This means we&#8217;re using a secure connection to the site.<\/p>\n<h3 id=\"how-to-force-http-to-https-redirect-for-addon-domains\">How to force HTTP to HTTPS redirect for Addon Domains?<\/h3>\n<p>One other aspect you need to know about this feature &#8211; <strong>Addon<\/strong> and <strong>parked<\/strong> <strong>domains<\/strong> inherit their settings from their associated domains.<\/p>\n<p>1. Click the gear icon and &#8220;Show Associated Subdomains.&#8221;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2842\" src=\"https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2020\/02\/Show-Assiciated-Subdomains.png\" alt=\"Show Associated Subdomains\" width=\"783\" height=\"191\" srcset=\"https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2020\/02\/Show-Assiciated-Subdomains.png 2406w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2020\/02\/Show-Assiciated-Subdomains-300x73.png 300w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2020\/02\/Show-Assiciated-Subdomains-1024x250.png 1024w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2020\/02\/Show-Assiciated-Subdomains-768x188.png 768w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2020\/02\/Show-Assiciated-Subdomains-50x12.png 50w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2020\/02\/Show-Assiciated-Subdomains-1536x375.png 1536w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2020\/02\/Show-Assiciated-Subdomains-2048x501.png 2048w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2020\/02\/Show-Assiciated-Subdomains-60x15.png 60w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2020\/02\/Show-Assiciated-Subdomains-100x24.png 100w\" sizes=\"auto, (max-width: 783px) 100vw, 783px\" \/><\/p>\n<p>2. The associated subdomain for that addon domain will appear. Set the appropriate force HTTPS redirect toggled to on. A success message will appear.<\/p>\n<p>In our example, we have forced HTTPS for domain.com, which is added as an addon:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2843\" src=\"https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2020\/02\/Addon-Domain-Toggle-On.png\" alt=\"\" width=\"783\" height=\"166\" srcset=\"https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2020\/02\/Addon-Domain-Toggle-On.png 2398w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2020\/02\/Addon-Domain-Toggle-On-300x64.png 300w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2020\/02\/Addon-Domain-Toggle-On-1024x217.png 1024w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2020\/02\/Addon-Domain-Toggle-On-768x163.png 768w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2020\/02\/Addon-Domain-Toggle-On-50x11.png 50w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2020\/02\/Addon-Domain-Toggle-On-1536x325.png 1536w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2020\/02\/Addon-Domain-Toggle-On-2048x434.png 2048w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2020\/02\/Addon-Domain-Toggle-On-60x13.png 60w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2020\/02\/Addon-Domain-Toggle-On-100x21.png 100w\" sizes=\"auto, (max-width: 783px) 100vw, 783px\" \/><\/p>\n<p>3. Now, let&#8217;s go back and access your website. Notice how it redirects us to the secure version, and we see a secure lock symbol in the location bar.<\/p>\n<p>That means we&#8217;re using a secure connection to the site.<\/p>\n<h3 id=\"resolving-ssl-mixed-content-warnings\">Resolving SSL Mixed Content Warnings<\/h3>\n<p>Once doing the redirect from HTTP to HTTPS, if you are facing SSL <a href=\"https:\/\/chemicloud.com\/kb\/article\/fix-mixed-content-warnings\/\" target=\"_blank\" rel=\"noopener noreferrer\">mixed content warnings<\/a>,\u00a0you only need to add the following lines of code to your site\u2019s .htaccess file:<\/p>\n<pre>&lt;ifModule mod_headers.c&gt;\r\nHeader always set Content-Security-Policy \"upgrade-insecure-requests;\"\r\n&lt;\/IfModule&gt;<\/pre>\n<p>Now let\u2019s go back and access your website. Notice how it redirects us to the secure version, and we see a secure lock symbol in the location bar.<\/p>\n<p>As always, we&#8217;re here if you have any questions!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>What is HTTPS, and why should you use it? HTTPS, displayed as a padlock icon in the web browser bar, indicates the SSL protocol is being used to send data between a web server and a website. Any website, especially those that require login credentials, and sensitive data, should use&#8230;<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"_crdt_document":"","footnotes":""},"ht-kb-category":[190],"ht-kb-tag":[],"class_list":["post-2829","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-domains"],"_links":{"self":[{"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/ht-kb\/2829","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/comments?post=2829"}],"version-history":[{"count":20,"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/ht-kb\/2829\/revisions"}],"predecessor-version":[{"id":7616,"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/ht-kb\/2829\/revisions\/7616"}],"wp:attachment":[{"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/media?parent=2829"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/ht-kb-category?post=2829"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/ht-kb-tag?post=2829"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}