{"id":256,"date":"2023-09-05T22:57:10","date_gmt":"2023-09-05T21:57:10","guid":{"rendered":"https:\/\/harmonweb.com\/blog\/?p=256"},"modified":"2023-09-05T22:57:10","modified_gmt":"2023-09-05T21:57:10","slug":"how-to-redirect-http-to-https-using-htaccess","status":"publish","type":"post","link":"https:\/\/harmonweb.com\/blog\/how-to-redirect-http-to-https-using-htaccess\/","title":{"rendered":"How to redirect HTTP to HTTPS Using .htaccess"},"content":{"rendered":"\n<p>Chrome and Firefox have started showing insecure warnings on sites without&nbsp;SSL certificates. Without SSL, your website will show insecure to the visitors. Therefore, using an SSL-encrypted connection for safety, accessibility or PCI compliance reasons is necessary. It becomes very important to redirect from HTTP to HTTPS.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-69d7c3ae81bd8\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69d7c3ae81bd8\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/harmonweb.com\/blog\/how-to-redirect-http-to-https-using-htaccess\/#What_is_SSL\" >What is SSL?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/harmonweb.com\/blog\/how-to-redirect-http-to-https-using-htaccess\/#Editing_htaccess_File\" >Editing .htaccess File<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/harmonweb.com\/blog\/how-to-redirect-http-to-https-using-htaccess\/#Editing_htaccess_in_cPanel_File_Manager\" >Editing .htaccess in cPanel File Manager<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/harmonweb.com\/blog\/how-to-redirect-http-to-https-using-htaccess\/#Redirecting_HTTP_to_HTTPS\" >Redirecting HTTP to HTTPS<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/harmonweb.com\/blog\/how-to-redirect-http-to-https-using-htaccess\/#1_Redirect_All_Web_Traffic\" >1. Redirect All Web Traffic<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/harmonweb.com\/blog\/how-to-redirect-http-to-https-using-htaccess\/#2_Redirect_Only_a_Specific_Domain\" >2. Redirect Only a Specific Domain<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/harmonweb.com\/blog\/how-to-redirect-http-to-https-using-htaccess\/#3_Redirect_Only_a_Specific_Folder\" >3. Redirect Only a Specific Folder<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h3 class=\"wp-block-heading\" id=\"what-is-ssl\"><span class=\"ez-toc-section\" id=\"What_is_SSL\"><\/span>What is SSL?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>SSL (Secure Sockets Layer) is a standard security protocol for establishing encrypted links between a web server and a browser in an online communication.<\/p>\n\n\n\n<p>The usage of SSL technology ensures that all data transmitted between the web server and browser remains encrypted.<\/p>\n\n\n\n<p>An&nbsp;<strong>SSL certificate<\/strong>&nbsp;is necessary to create SSL connection. You would need to give all details about the identity of your website and your company as and when you choose to activate SSL on your web server. Following this, two cryptographic keys are created\u200a\u2014\u200aa Private Key and a Public Key.<\/p>\n\n\n\n<p>In order to force your web traffic to use HTTPS, edit the codes in the&nbsp;<strong>.htaccess file.<\/strong><\/p>\n\n\n\n<p>Before we move onto redirecting HTTP to HTTPS, here\u2019s how you can edit .htaccess file. If you already know skip to Redirection steps.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"editing-htaccess-file\"><span class=\"ez-toc-section\" id=\"Editing_htaccess_File\"><\/span>Editing .htaccess File<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>There are instructions\/directives in the .htaccess file that tell the server how to act in certain scenarios and directly affects how your website functions. Common directives in .htaccess file:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Redirects<\/li>\n\n\n\n<li>Rewriting URLs<\/li>\n<\/ul>\n\n\n\n<p><strong>Ways to edit an .htaccess file:<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Edit the file on your computer and upload it to the server using FTP.<\/li>\n\n\n\n<li>Use \u201cEdit\u201d mode in FTP program that allows you to edit a file remotely.<\/li>\n\n\n\n<li>Use a text editor and SSH to edit the file.<\/li>\n\n\n\n<li>Use the File Manager in&nbsp;<strong>cPanel<\/strong>&nbsp;to edit the file.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"editing-htaccess-in-cpanel-file-manager\"><span class=\"ez-toc-section\" id=\"Editing_htaccess_in_cPanel_File_Manager\"><\/span>Editing .htaccess in cPanel File Manager<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p><strong>Note:&nbsp;<\/strong>Backup your website in case something goes wrong.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Login to cPanel<\/li>\n\n\n\n<li>Files &gt; File Manager &gt; Document Root for:<\/li>\n\n\n\n<li>Now select the domain name you want to access<\/li>\n\n\n\n<li>Check \u201cShow Hidden Files (dotfiles)\u201d<\/li>\n\n\n\n<li>Click \u201cGo\u201d<\/li>\n\n\n\n<li>After a new tab or window opens, look for the .htaccess file.<\/li>\n\n\n\n<li>Right click on the .htaccess file and click on \u201cCode Edit\u201d on the menu.<\/li>\n\n\n\n<li>A dialogue box may pop up asking about encoding. Click \u201cEdit\u201d button to continue.<\/li>\n\n\n\n<li>Edit the file<\/li>\n\n\n\n<li>\u201cSave Changes\u201d when done.<\/li>\n\n\n\n<li>Test your website to make sure it is done correctly. In case, there is an error, restore to the previous version and try again.<\/li>\n\n\n\n<li>Once you are done, click \u201cClose\u201d to close the window.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"redirecting-http-to-https\"><span class=\"ez-toc-section\" id=\"Redirecting_HTTP_to_HTTPS\"><\/span>Redirecting HTTP to HTTPS<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"1-redirect-all-web-traffic\"><span class=\"ez-toc-section\" id=\"1_Redirect_All_Web_Traffic\"><\/span>1. Redirect All Web Traffic<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>If you have existing code in your .htaccess, add the following:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>RewriteEngine On\r\nRewriteCond %{HTTPS} off\r\nRewriteRule (.*) https:\/\/%{HTTP_HOST}%{REQUEST_URI} &#91;R=301,L]\r<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"2-redirect-only-a-specific-domain\"><span class=\"ez-toc-section\" id=\"2_Redirect_Only_a_Specific_Domain\"><\/span>2. Redirect Only a Specific Domain<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>For redirecting a specific domain to use HTTPS, add the following:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>RewriteEngine On\nRewriteCond %{HTTP_HOST} ^yourdomain\\.com &#91;NC]\nRewriteCond %{SERVER_PORT} 80\nRewriteRule ^(.*)$ https:\/\/www.yourdomain.com\/$1 &#91;R,L]<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"3-redirect-only-a-specific-folder\"><span class=\"ez-toc-section\" id=\"3_Redirect_Only_a_Specific_Folder\"><\/span>3. Redirect Only a Specific Folder<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Redirecting to HTTPS on a specific folder, add the following:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>RewriteEngine On\nRewriteCond %{SERVER_PORT} 80\nRewriteCond %{REQUEST_URI} folder\nRewriteRule ^(.*)$ https:\/\/www.yourdomain.com\/folder\/$1 &#91;R,L]<\/code><\/pre>\n\n\n\n<p>Note: Replace&nbsp;<em><code>\u201cyourdomain\u201d<\/code><\/em>&nbsp;with your actual domain name wherever required. Also, in case of the folder, replace<em>&nbsp;<code>\/folder<\/code><\/em>&nbsp;with the actual folder name.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Chrome and Firefox have started showing insecure warnings on sites without&nbsp;SSL certificates. Without SSL, your website will show&hellip;<\/p>\n","protected":false},"author":1,"featured_media":257,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[158],"tags":[],"class_list":["post-256","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-troubleshooting"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to redirect HTTP to HTTPS Using .htaccess | HarmonWeb Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/harmonweb.com\/blog\/how-to-redirect-http-to-https-using-htaccess\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to redirect HTTP to HTTPS Using .htaccess | HarmonWeb Blog\" \/>\n<meta property=\"og:description\" content=\"Chrome and Firefox have started showing insecure warnings on sites without&nbsp;SSL certificates. Without SSL, your website will show&hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/harmonweb.com\/blog\/how-to-redirect-http-to-https-using-htaccess\/\" \/>\n<meta property=\"og:site_name\" content=\"HarmonWeb Blog\" \/>\n<meta property=\"article:published_time\" content=\"2023-09-05T21:57:10+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/harmonweb.com\/blog\/wp-content\/uploads\/2021\/02\/0_wUTFJrRSM2vh1H7v.jpg?v=1612734433\" \/>\n\t<meta property=\"og:image:width\" content=\"800\" \/>\n\t<meta property=\"og:image:height\" content=\"289\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"John Adegoke\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"John Adegoke\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/how-to-redirect-http-to-https-using-htaccess\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/how-to-redirect-http-to-https-using-htaccess\\\/\"},\"author\":{\"name\":\"John Adegoke\",\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/#\\\/schema\\\/person\\\/e9bc75c3e7e30a261690c47ec872a8fc\"},\"headline\":\"How to redirect HTTP to HTTPS Using .htaccess\",\"datePublished\":\"2023-09-05T21:57:10+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/how-to-redirect-http-to-https-using-htaccess\\\/\"},\"wordCount\":487,\"commentCount\":3,\"publisher\":{\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/how-to-redirect-http-to-https-using-htaccess\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/02\\\/0_wUTFJrRSM2vh1H7v.jpg\",\"articleSection\":[\"Troubleshooting\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/harmonweb.com\\\/blog\\\/how-to-redirect-http-to-https-using-htaccess\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/how-to-redirect-http-to-https-using-htaccess\\\/\",\"url\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/how-to-redirect-http-to-https-using-htaccess\\\/\",\"name\":\"How to redirect HTTP to HTTPS Using .htaccess | HarmonWeb Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/how-to-redirect-http-to-https-using-htaccess\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/how-to-redirect-http-to-https-using-htaccess\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/02\\\/0_wUTFJrRSM2vh1H7v.jpg\",\"datePublished\":\"2023-09-05T21:57:10+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/how-to-redirect-http-to-https-using-htaccess\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/harmonweb.com\\\/blog\\\/how-to-redirect-http-to-https-using-htaccess\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/how-to-redirect-http-to-https-using-htaccess\\\/#primaryimage\",\"url\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/02\\\/0_wUTFJrRSM2vh1H7v.jpg\",\"contentUrl\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/02\\\/0_wUTFJrRSM2vh1H7v.jpg\",\"width\":800,\"height\":289},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/how-to-redirect-http-to-https-using-htaccess\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to redirect HTTP to HTTPS Using .htaccess\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/\",\"name\":\"HarmonWeb Blog\",\"description\":\"HarmonWeb\",\"publisher\":{\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/#organization\",\"name\":\"HarmonWeb\",\"url\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/cropped-HARMON-WEB-LOGO-2.png\",\"contentUrl\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/cropped-HARMON-WEB-LOGO-2.png\",\"width\":831,\"height\":172,\"caption\":\"HarmonWeb\"},\"image\":{\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/#\\\/schema\\\/person\\\/e9bc75c3e7e30a261690c47ec872a8fc\",\"name\":\"John Adegoke\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/wp-content\\\/litespeed\\\/avatar\\\/0843e926db683e41ace2aee54210b841.jpg?ver=1775630058\",\"url\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/wp-content\\\/litespeed\\\/avatar\\\/0843e926db683e41ace2aee54210b841.jpg?ver=1775630058\",\"contentUrl\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/wp-content\\\/litespeed\\\/avatar\\\/0843e926db683e41ace2aee54210b841.jpg?ver=1775630058\",\"caption\":\"John Adegoke\"},\"sameAs\":[\"https:\\\/\\\/harmonweb.com\\\/blog\"],\"url\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/author\\\/harmonweb\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to redirect HTTP to HTTPS Using .htaccess | HarmonWeb Blog","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:\/\/harmonweb.com\/blog\/how-to-redirect-http-to-https-using-htaccess\/","og_locale":"en_US","og_type":"article","og_title":"How to redirect HTTP to HTTPS Using .htaccess | HarmonWeb Blog","og_description":"Chrome and Firefox have started showing insecure warnings on sites without&nbsp;SSL certificates. Without SSL, your website will show&hellip;","og_url":"https:\/\/harmonweb.com\/blog\/how-to-redirect-http-to-https-using-htaccess\/","og_site_name":"HarmonWeb Blog","article_published_time":"2023-09-05T21:57:10+00:00","og_image":[{"width":800,"height":289,"url":"https:\/\/harmonweb.com\/blog\/wp-content\/uploads\/2021\/02\/0_wUTFJrRSM2vh1H7v.jpg?v=1612734433","type":"image\/jpeg"}],"author":"John Adegoke","twitter_card":"summary_large_image","twitter_misc":{"Written by":"John Adegoke","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/harmonweb.com\/blog\/how-to-redirect-http-to-https-using-htaccess\/#article","isPartOf":{"@id":"https:\/\/harmonweb.com\/blog\/how-to-redirect-http-to-https-using-htaccess\/"},"author":{"name":"John Adegoke","@id":"https:\/\/harmonweb.com\/blog\/#\/schema\/person\/e9bc75c3e7e30a261690c47ec872a8fc"},"headline":"How to redirect HTTP to HTTPS Using .htaccess","datePublished":"2023-09-05T21:57:10+00:00","mainEntityOfPage":{"@id":"https:\/\/harmonweb.com\/blog\/how-to-redirect-http-to-https-using-htaccess\/"},"wordCount":487,"commentCount":3,"publisher":{"@id":"https:\/\/harmonweb.com\/blog\/#organization"},"image":{"@id":"https:\/\/harmonweb.com\/blog\/how-to-redirect-http-to-https-using-htaccess\/#primaryimage"},"thumbnailUrl":"https:\/\/harmonweb.com\/blog\/wp-content\/uploads\/2021\/02\/0_wUTFJrRSM2vh1H7v.jpg","articleSection":["Troubleshooting"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/harmonweb.com\/blog\/how-to-redirect-http-to-https-using-htaccess\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/harmonweb.com\/blog\/how-to-redirect-http-to-https-using-htaccess\/","url":"https:\/\/harmonweb.com\/blog\/how-to-redirect-http-to-https-using-htaccess\/","name":"How to redirect HTTP to HTTPS Using .htaccess | HarmonWeb Blog","isPartOf":{"@id":"https:\/\/harmonweb.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/harmonweb.com\/blog\/how-to-redirect-http-to-https-using-htaccess\/#primaryimage"},"image":{"@id":"https:\/\/harmonweb.com\/blog\/how-to-redirect-http-to-https-using-htaccess\/#primaryimage"},"thumbnailUrl":"https:\/\/harmonweb.com\/blog\/wp-content\/uploads\/2021\/02\/0_wUTFJrRSM2vh1H7v.jpg","datePublished":"2023-09-05T21:57:10+00:00","breadcrumb":{"@id":"https:\/\/harmonweb.com\/blog\/how-to-redirect-http-to-https-using-htaccess\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/harmonweb.com\/blog\/how-to-redirect-http-to-https-using-htaccess\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/harmonweb.com\/blog\/how-to-redirect-http-to-https-using-htaccess\/#primaryimage","url":"https:\/\/harmonweb.com\/blog\/wp-content\/uploads\/2021\/02\/0_wUTFJrRSM2vh1H7v.jpg","contentUrl":"https:\/\/harmonweb.com\/blog\/wp-content\/uploads\/2021\/02\/0_wUTFJrRSM2vh1H7v.jpg","width":800,"height":289},{"@type":"BreadcrumbList","@id":"https:\/\/harmonweb.com\/blog\/how-to-redirect-http-to-https-using-htaccess\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/harmonweb.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to redirect HTTP to HTTPS Using .htaccess"}]},{"@type":"WebSite","@id":"https:\/\/harmonweb.com\/blog\/#website","url":"https:\/\/harmonweb.com\/blog\/","name":"HarmonWeb Blog","description":"HarmonWeb","publisher":{"@id":"https:\/\/harmonweb.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/harmonweb.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/harmonweb.com\/blog\/#organization","name":"HarmonWeb","url":"https:\/\/harmonweb.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/harmonweb.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/harmonweb.com\/blog\/wp-content\/uploads\/2020\/06\/cropped-HARMON-WEB-LOGO-2.png","contentUrl":"https:\/\/harmonweb.com\/blog\/wp-content\/uploads\/2020\/06\/cropped-HARMON-WEB-LOGO-2.png","width":831,"height":172,"caption":"HarmonWeb"},"image":{"@id":"https:\/\/harmonweb.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/harmonweb.com\/blog\/#\/schema\/person\/e9bc75c3e7e30a261690c47ec872a8fc","name":"John Adegoke","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/harmonweb.com\/blog\/wp-content\/litespeed\/avatar\/0843e926db683e41ace2aee54210b841.jpg?ver=1775630058","url":"https:\/\/harmonweb.com\/blog\/wp-content\/litespeed\/avatar\/0843e926db683e41ace2aee54210b841.jpg?ver=1775630058","contentUrl":"https:\/\/harmonweb.com\/blog\/wp-content\/litespeed\/avatar\/0843e926db683e41ace2aee54210b841.jpg?ver=1775630058","caption":"John Adegoke"},"sameAs":["https:\/\/harmonweb.com\/blog"],"url":"https:\/\/harmonweb.com\/blog\/author\/harmonweb\/"}]}},"_links":{"self":[{"href":"https:\/\/harmonweb.com\/blog\/wp-json\/wp\/v2\/posts\/256","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/harmonweb.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/harmonweb.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/harmonweb.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/harmonweb.com\/blog\/wp-json\/wp\/v2\/comments?post=256"}],"version-history":[{"count":2,"href":"https:\/\/harmonweb.com\/blog\/wp-json\/wp\/v2\/posts\/256\/revisions"}],"predecessor-version":[{"id":2241,"href":"https:\/\/harmonweb.com\/blog\/wp-json\/wp\/v2\/posts\/256\/revisions\/2241"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/harmonweb.com\/blog\/wp-json\/wp\/v2\/media\/257"}],"wp:attachment":[{"href":"https:\/\/harmonweb.com\/blog\/wp-json\/wp\/v2\/media?parent=256"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/harmonweb.com\/blog\/wp-json\/wp\/v2\/categories?post=256"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/harmonweb.com\/blog\/wp-json\/wp\/v2\/tags?post=256"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}