{"id":8827,"date":"2023-07-11T09:58:48","date_gmt":"2023-07-11T09:58:48","guid":{"rendered":"https:\/\/truehost.com\/support\/?post_type=ht_kb&#038;p=8827"},"modified":"2024-06-07T12:57:59","modified_gmt":"2024-06-07T12:57:59","password":"","slug":"force-http-to-https-redirect-in-opencart","status":"publish","type":"docs","link":"https:\/\/truehost.com\/support\/knowledge-base\/force-http-to-https-redirect-in-opencart\/","title":{"rendered":"How To Force HTTP to HTTPS Redirect In OpenCart"},"content":{"rendered":"\n<p>Learn how to force HTTP to HTTPS redirect in OpenCart. OpenCart is an open-source e-commerce platform that allows you to create and manage an online store.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/91l73gn46u1-Yi3OzsVvsF4O9WkYdMmVJ3lyHJuvHT_IS8Pwj7c6UfKCO-XnYUjC5pzRkyTh3mNZuhRVifge9PaBGSODuNgn1hIog2o_FLMujCKgGVnghbnOpVcoL7SatkwW3j4cLt1Tz2G6o22vByY\" alt=\"Force HTTP to HTTPS Redirect In OpenCart\"\/><\/figure>\n\n\n\n<p>It is a popular choice for businesses of all sizes, as it is free to use, and a wide range of extensions and themes are available to customize your store.<\/p>\n\n\n\n<p>Here are some reasons to use OpenCart:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Free and open-source. OpenCart is free to download and use; the source code is available for anyone to modify. Save money on development costs and have the flexibility to customize your store to your specific needs.<\/li><li>Extensive community support. There is a large and active community of OpenCart users and developers who can provide support and help you troubleshoot problems.&nbsp;<\/li><li>Flexible and scalable. OpenCart is a flexible platform that can be scaled to meet the needs of your business. You can start with a small store and then grow as your business grows.<\/li><li>Reliable and secure. OpenCart is a reliable and secure platform regularly updated with security patches. It helps to protect your store from hackers and other malicious attacks.<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Steps on how to force HTTP to HTTPS redirect in OpenCart:<\/strong><\/h2>\n\n\n\n<p>Ensure you have an SSL certificate installed for your website. It will help support the HTTPS for your site.<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Login into OpenCart and make changes to your PHP. Open the \u2018c&#8217;nfig.php\u2019 &#8216;ile in your OpenCart installation.<\/li><li>Find the following line of code:<\/li><\/ol>\n\n\n\n<p><em>$config[&#8216;config_ssl&#8217;][&#8216;use_https&#8217;] = false;<\/em><\/p>\n\n\n\n<p>Change the value of \u2018f&#8217;lse\u2019 &#8216;o \u2018t&#8217;ue,\u2019 &#8216;hen save the \u2018c&#8217;nfig.php\u2019 &#8216;ile.<\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"3\"><li>Add the following code to your\u00a0  &#8216;taccess\u2019 &#8216;ile:<\/li><\/ol>\n\n\n\n<p><em>RewriteEngine On<\/em><\/p>\n\n\n\n<p><em>RewriteCond %{SERVER_PORT} 80<\/em><\/p>\n\n\n\n<p><em>RewriteRule ^(.*)$ https:\/\/%{HTTP_HOST}\/$1 [R,L]<\/em><\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"4\"><li>Save the\u00a0  &#8216;taccess\u2019 &#8216;ile.<\/li><\/ol>\n\n\n\n<p>Once you have completed these steps, all HTTP requests to your website will be redirected to HTTPS.<\/p>\n\n\n\n<p>Things to remember:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>You may need to clear your browser&#8217;s cache and cookies to see the redirect working.<\/li><li>If you are using a CDN, you must update the CDCDN&#8217;sonfiguration to point to the HTTPS version of your website.<\/li><li>You should also update your robots.txt file to include the HTTPS version of your website.<\/li><\/ul>\n\n\n\n<p>Now your site is ready to use the HTTPS redirect. Have these benefits:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Increased security: HTTPS is a more secure protocol than HTTP, encrypting all traffic between your website and visitors&#8217; browsers.\u00a0<\/li><li>Improved SEO: Google and other search engines now favor HTTPS websites. Your website may rank higher in search results if you use HTTPS.<\/li><li>Enhanced user experience: Visitors are likelier to trust and stay on an HTTPS website. HTTPS signals that the website is secure and its data is safe.<\/li><li>Reduced bounce rates: Studies have shown that HTTPS websites have lower bounce rates. Visitors are likelier to stay on your website and interact with your content if you use HTTPS.<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>To finalize,<\/strong><\/h2>\n\n\n\n<p>Forcing HTTP to HTTPS redirect in OpenCart is easy. Consider using HTTPS redirect for your OpenCart.&nbsp;<\/p>\n\n\n\n<p>Get more security and ensure a smooth user experience.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Learn how to force HTTP to HTTPS redirect in OpenCart. OpenCart is an open-source e-commerce platform that allows you to create and manage an online store.&nbsp; It is a popular choice for businesses of all sizes, as it is free to use, and a wide range of extensions and themes are available to customize your [&hellip;]<\/p>\n","protected":false},"author":23,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"_eb_attr":"","_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"doc_category":[],"doc_tag":[],"class_list":["post-8827","docs","type-docs","status-publish","hentry"],"year_month":"2026-06","word_count":491,"total_views":0,"reactions":{"happy":0,"normal":0,"sad":0},"author_info":{"name":"Mark","author_nicename":"mark","author_url":"https:\/\/truehost.com\/support\/author\/mark\/"},"doc_category_info":[],"doc_tag_info":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How To Force HTTP to HTTPS Redirect In OpenCart<\/title>\n<meta name=\"description\" content=\"Let&#039;s force HTTP to HTTPS redirect in OpenCart and ensure everyone has a smooth experience. Make it secure for everyone to transact with you!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/truehost.com\/support\/knowledge-base\/force-http-to-https-redirect-in-opencart\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How To Force HTTP to HTTPS Redirect In OpenCart\" \/>\n<meta property=\"og:description\" content=\"Let&#039;s force HTTP to HTTPS redirect in OpenCart and ensure everyone has a smooth experience. Make it secure for everyone to transact with you!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/truehost.com\/support\/knowledge-base\/force-http-to-https-redirect-in-opencart\/\" \/>\n<meta property=\"article:modified_time\" content=\"2024-06-07T12:57:59+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/lh3.googleusercontent.com\/91l73gn46u1-Yi3OzsVvsF4O9WkYdMmVJ3lyHJuvHT_IS8Pwj7c6UfKCO-XnYUjC5pzRkyTh3mNZuhRVifge9PaBGSODuNgn1hIog2o_FLMujCKgGVnghbnOpVcoL7SatkwW3j4cLt1Tz2G6o22vByY\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/force-http-to-https-redirect-in-opencart\\\/\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/force-http-to-https-redirect-in-opencart\\\/\",\"name\":\"How To Force HTTP to HTTPS Redirect In OpenCart\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/force-http-to-https-redirect-in-opencart\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/force-http-to-https-redirect-in-opencart\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/lh3.googleusercontent.com\\\/91l73gn46u1-Yi3OzsVvsF4O9WkYdMmVJ3lyHJuvHT_IS8Pwj7c6UfKCO-XnYUjC5pzRkyTh3mNZuhRVifge9PaBGSODuNgn1hIog2o_FLMujCKgGVnghbnOpVcoL7SatkwW3j4cLt1Tz2G6o22vByY\",\"datePublished\":\"2023-07-11T09:58:48+00:00\",\"dateModified\":\"2024-06-07T12:57:59+00:00\",\"description\":\"Let's force HTTP to HTTPS redirect in OpenCart and ensure everyone has a smooth experience. Make it secure for everyone to transact with you!\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/force-http-to-https-redirect-in-opencart\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/force-http-to-https-redirect-in-opencart\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/force-http-to-https-redirect-in-opencart\\\/#primaryimage\",\"url\":\"https:\\\/\\\/lh3.googleusercontent.com\\\/91l73gn46u1-Yi3OzsVvsF4O9WkYdMmVJ3lyHJuvHT_IS8Pwj7c6UfKCO-XnYUjC5pzRkyTh3mNZuhRVifge9PaBGSODuNgn1hIog2o_FLMujCKgGVnghbnOpVcoL7SatkwW3j4cLt1Tz2G6o22vByY\",\"contentUrl\":\"https:\\\/\\\/lh3.googleusercontent.com\\\/91l73gn46u1-Yi3OzsVvsF4O9WkYdMmVJ3lyHJuvHT_IS8Pwj7c6UfKCO-XnYUjC5pzRkyTh3mNZuhRVifge9PaBGSODuNgn1hIog2o_FLMujCKgGVnghbnOpVcoL7SatkwW3j4cLt1Tz2G6o22vByY\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/force-http-to-https-redirect-in-opencart\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.truehost.com\\\/support\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How To Force HTTP to HTTPS Redirect In OpenCart\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#website\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/\",\"name\":\"\",\"description\":\"Help In a Click\",\"publisher\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/truehost.com\\\/support\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#organization\",\"name\":\"Truehost Kenya\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/cropped-image_2026-04-16_174808866.png\",\"contentUrl\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/cropped-image_2026-04-16_174808866.png\",\"width\":240,\"height\":48,\"caption\":\"Truehost Kenya\"},\"image\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#\\\/schema\\\/logo\\\/image\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How To Force HTTP to HTTPS Redirect In OpenCart","description":"Let's force HTTP to HTTPS redirect in OpenCart and ensure everyone has a smooth experience. Make it secure for everyone to transact with you!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/truehost.com\/support\/knowledge-base\/force-http-to-https-redirect-in-opencart\/","og_locale":"en_US","og_type":"article","og_title":"How To Force HTTP to HTTPS Redirect In OpenCart","og_description":"Let's force HTTP to HTTPS redirect in OpenCart and ensure everyone has a smooth experience. Make it secure for everyone to transact with you!","og_url":"https:\/\/truehost.com\/support\/knowledge-base\/force-http-to-https-redirect-in-opencart\/","article_modified_time":"2024-06-07T12:57:59+00:00","og_image":[{"url":"https:\/\/lh3.googleusercontent.com\/91l73gn46u1-Yi3OzsVvsF4O9WkYdMmVJ3lyHJuvHT_IS8Pwj7c6UfKCO-XnYUjC5pzRkyTh3mNZuhRVifge9PaBGSODuNgn1hIog2o_FLMujCKgGVnghbnOpVcoL7SatkwW3j4cLt1Tz2G6o22vByY","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/truehost.com\/support\/knowledge-base\/force-http-to-https-redirect-in-opencart\/","url":"https:\/\/truehost.com\/support\/knowledge-base\/force-http-to-https-redirect-in-opencart\/","name":"How To Force HTTP to HTTPS Redirect In OpenCart","isPartOf":{"@id":"https:\/\/truehost.com\/support\/#website"},"primaryImageOfPage":{"@id":"https:\/\/truehost.com\/support\/knowledge-base\/force-http-to-https-redirect-in-opencart\/#primaryimage"},"image":{"@id":"https:\/\/truehost.com\/support\/knowledge-base\/force-http-to-https-redirect-in-opencart\/#primaryimage"},"thumbnailUrl":"https:\/\/lh3.googleusercontent.com\/91l73gn46u1-Yi3OzsVvsF4O9WkYdMmVJ3lyHJuvHT_IS8Pwj7c6UfKCO-XnYUjC5pzRkyTh3mNZuhRVifge9PaBGSODuNgn1hIog2o_FLMujCKgGVnghbnOpVcoL7SatkwW3j4cLt1Tz2G6o22vByY","datePublished":"2023-07-11T09:58:48+00:00","dateModified":"2024-06-07T12:57:59+00:00","description":"Let's force HTTP to HTTPS redirect in OpenCart and ensure everyone has a smooth experience. Make it secure for everyone to transact with you!","breadcrumb":{"@id":"https:\/\/truehost.com\/support\/knowledge-base\/force-http-to-https-redirect-in-opencart\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/truehost.com\/support\/knowledge-base\/force-http-to-https-redirect-in-opencart\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/truehost.com\/support\/knowledge-base\/force-http-to-https-redirect-in-opencart\/#primaryimage","url":"https:\/\/lh3.googleusercontent.com\/91l73gn46u1-Yi3OzsVvsF4O9WkYdMmVJ3lyHJuvHT_IS8Pwj7c6UfKCO-XnYUjC5pzRkyTh3mNZuhRVifge9PaBGSODuNgn1hIog2o_FLMujCKgGVnghbnOpVcoL7SatkwW3j4cLt1Tz2G6o22vByY","contentUrl":"https:\/\/lh3.googleusercontent.com\/91l73gn46u1-Yi3OzsVvsF4O9WkYdMmVJ3lyHJuvHT_IS8Pwj7c6UfKCO-XnYUjC5pzRkyTh3mNZuhRVifge9PaBGSODuNgn1hIog2o_FLMujCKgGVnghbnOpVcoL7SatkwW3j4cLt1Tz2G6o22vByY"},{"@type":"BreadcrumbList","@id":"https:\/\/truehost.com\/support\/knowledge-base\/force-http-to-https-redirect-in-opencart\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.truehost.com\/support\/"},{"@type":"ListItem","position":2,"name":"How To Force HTTP to HTTPS Redirect In OpenCart"}]},{"@type":"WebSite","@id":"https:\/\/truehost.com\/support\/#website","url":"https:\/\/truehost.com\/support\/","name":"","description":"Help In a Click","publisher":{"@id":"https:\/\/truehost.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/truehost.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/truehost.com\/support\/#organization","name":"Truehost Kenya","url":"https:\/\/truehost.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/truehost.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2026\/04\/cropped-image_2026-04-16_174808866.png","contentUrl":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2026\/04\/cropped-image_2026-04-16_174808866.png","width":240,"height":48,"caption":"Truehost Kenya"},"image":{"@id":"https:\/\/truehost.com\/support\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/docs\/8827","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/users\/23"}],"replies":[{"embeddable":true,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/comments?post=8827"}],"version-history":[{"count":1,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/docs\/8827\/revisions"}],"predecessor-version":[{"id":8828,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/docs\/8827\/revisions\/8828"}],"wp:attachment":[{"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/media?parent=8827"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/doc_category?post=8827"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/doc_tag?post=8827"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}