{"id":723,"date":"2023-01-17T07:42:59","date_gmt":"2023-01-17T07:42:59","guid":{"rendered":"https:\/\/www.cyberrafting.com\/blog\/?p=723"},"modified":"2023-01-17T07:44:01","modified_gmt":"2023-01-17T07:44:01","slug":"redirect-http-to-https","status":"publish","type":"post","link":"https:\/\/www.cyberrafting.com\/blog\/how-to\/redirect-http-to-https\/","title":{"rendered":"How to 301 Redirect HTTP  to HTTPS Using htaccess? Non-secure to Secure"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong>! Not Secure&nbsp;<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This message dosent look good next to your domain url on a web browser. To make your website secure, you need to install an SSL certificate.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you have installed your SSL certificate and still you are getting the above message, then you simply have to redirect you http to https using the .htaccess file in the root directory of the web server.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here is a complete guide to redirecting http to https using .htaccess.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Nowadays, HTTPS is a necessity. It symbolizes trust. A warning appears when a visitor loads a website running on HTTP in Google Chrome, Firefox, and other popular browsers. Sites marked as unsecure are marked as such.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The importance of using secure sockets for eCommerce stores cannot be overstated.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Using .htaccess, I will show you how to force a redirect from HTTP to HTTPS in this post.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Using cPanel File Manager, edit the .htaccess file:<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open your cPanel account<\/li>\n\n\n\n<li>Click on File Manager from the Files Tab<\/li>\n\n\n\n<li>Find the \u201cSetting\u201d at the top right corner of the page, click on it<\/li>\n\n\n\n<li>Click on the Document Root for (the domain name) and check the Show Hidden Files (image below)<\/li>\n\n\n\n<li>Save to update the File Manager<\/li>\n\n\n\n<li>Find the public_html file and click on it<\/li>\n\n\n\n<li>On the next page, you will find the .htaccess file<\/li>\n\n\n\n<li>Click once on the .htachess file and then click on the \u201cEdit\u201d at the top bar<\/li>\n\n\n\n<li>A warning box will pop up, but click on Edit<\/li>\n\n\n\n<li>On the next page, a code editor will open<\/li>\n\n\n\n<li>Edit the code<\/li>\n\n\n\n<li>Save the file<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Redirect HTTP to HTTPS<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Redirect All Web Traffic<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Add this code below the existing code in your .htaccess file.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>RewriteEngine On \r\nRewriteCond %{SERVER_PORT} 80 \r\nRewriteRule ^(.*)$ https:\/\/www.yourdomain.com\/$1 &#91;R,L]<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>! Not Secure&nbsp; This message dosent look good next to your domain url on a web browser. To make your website secure, you need to &hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"class_list":["post-723","post","type-post","status-publish","format-standard","hentry","category-how-to"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Redirect HTTP to HTTPS Using htaccess? Non-secure to Secure<\/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:\/\/www.cyberrafting.com\/blog\/how-to\/redirect-http-to-https\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Redirect HTTP to HTTPS Using htaccess? Non-secure to Secure\" \/>\n<meta property=\"og:description\" content=\"! Not Secure&nbsp; This message dosent look good next to your domain url on a web browser. To make your website secure, you need to &hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.cyberrafting.com\/blog\/how-to\/redirect-http-to-https\/\" \/>\n<meta property=\"og:site_name\" content=\"Cyber Rafting\" \/>\n<meta property=\"article:published_time\" content=\"2023-01-17T07:42:59+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-01-17T07:44:01+00:00\" \/>\n<meta name=\"author\" content=\"cyberrafting\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"cyberrafting\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.cyberrafting.com\\\/blog\\\/how-to\\\/redirect-http-to-https\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.cyberrafting.com\\\/blog\\\/how-to\\\/redirect-http-to-https\\\/\"},\"author\":{\"name\":\"cyberrafting\",\"@id\":\"https:\\\/\\\/www.cyberrafting.com\\\/blog\\\/#\\\/schema\\\/person\\\/0533280d6685c57435a3151c387fff99\"},\"headline\":\"How to 301 Redirect HTTP to HTTPS Using htaccess? Non-secure to Secure\",\"datePublished\":\"2023-01-17T07:42:59+00:00\",\"dateModified\":\"2023-01-17T07:44:01+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.cyberrafting.com\\\/blog\\\/how-to\\\/redirect-http-to-https\\\/\"},\"wordCount\":292,\"commentCount\":0,\"articleSection\":[\"How To\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.cyberrafting.com\\\/blog\\\/how-to\\\/redirect-http-to-https\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.cyberrafting.com\\\/blog\\\/how-to\\\/redirect-http-to-https\\\/\",\"url\":\"https:\\\/\\\/www.cyberrafting.com\\\/blog\\\/how-to\\\/redirect-http-to-https\\\/\",\"name\":\"Redirect HTTP to HTTPS Using htaccess? Non-secure to Secure\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.cyberrafting.com\\\/blog\\\/#website\"},\"datePublished\":\"2023-01-17T07:42:59+00:00\",\"dateModified\":\"2023-01-17T07:44:01+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.cyberrafting.com\\\/blog\\\/#\\\/schema\\\/person\\\/0533280d6685c57435a3151c387fff99\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.cyberrafting.com\\\/blog\\\/how-to\\\/redirect-http-to-https\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.cyberrafting.com\\\/blog\\\/how-to\\\/redirect-http-to-https\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.cyberrafting.com\\\/blog\\\/how-to\\\/redirect-http-to-https\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.cyberrafting.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to 301 Redirect HTTP to HTTPS Using htaccess? Non-secure to Secure\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.cyberrafting.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.cyberrafting.com\\\/blog\\\/\",\"name\":\"Cyber Rafting Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.cyberrafting.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.cyberrafting.com\\\/blog\\\/#\\\/schema\\\/person\\\/0533280d6685c57435a3151c387fff99\",\"name\":\"cyberrafting\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c1f1c30a5a84d51fe015a59038822cd67358fd7fa1e202f74b946af36798f286?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c1f1c30a5a84d51fe015a59038822cd67358fd7fa1e202f74b946af36798f286?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c1f1c30a5a84d51fe015a59038822cd67358fd7fa1e202f74b946af36798f286?s=96&d=mm&r=g\",\"caption\":\"cyberrafting\"},\"sameAs\":[\"https:\\\/\\\/www.cyberrafting.com\\\/blog\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Redirect HTTP to HTTPS Using htaccess? Non-secure to Secure","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:\/\/www.cyberrafting.com\/blog\/how-to\/redirect-http-to-https\/","og_locale":"en_US","og_type":"article","og_title":"Redirect HTTP to HTTPS Using htaccess? Non-secure to Secure","og_description":"! Not Secure&nbsp; This message dosent look good next to your domain url on a web browser. To make your website secure, you need to &hellip;","og_url":"https:\/\/www.cyberrafting.com\/blog\/how-to\/redirect-http-to-https\/","og_site_name":"Cyber Rafting","article_published_time":"2023-01-17T07:42:59+00:00","article_modified_time":"2023-01-17T07:44:01+00:00","author":"cyberrafting","twitter_card":"summary_large_image","twitter_misc":{"Written by":"cyberrafting","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.cyberrafting.com\/blog\/how-to\/redirect-http-to-https\/#article","isPartOf":{"@id":"https:\/\/www.cyberrafting.com\/blog\/how-to\/redirect-http-to-https\/"},"author":{"name":"cyberrafting","@id":"https:\/\/www.cyberrafting.com\/blog\/#\/schema\/person\/0533280d6685c57435a3151c387fff99"},"headline":"How to 301 Redirect HTTP to HTTPS Using htaccess? Non-secure to Secure","datePublished":"2023-01-17T07:42:59+00:00","dateModified":"2023-01-17T07:44:01+00:00","mainEntityOfPage":{"@id":"https:\/\/www.cyberrafting.com\/blog\/how-to\/redirect-http-to-https\/"},"wordCount":292,"commentCount":0,"articleSection":["How To"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.cyberrafting.com\/blog\/how-to\/redirect-http-to-https\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.cyberrafting.com\/blog\/how-to\/redirect-http-to-https\/","url":"https:\/\/www.cyberrafting.com\/blog\/how-to\/redirect-http-to-https\/","name":"Redirect HTTP to HTTPS Using htaccess? Non-secure to Secure","isPartOf":{"@id":"https:\/\/www.cyberrafting.com\/blog\/#website"},"datePublished":"2023-01-17T07:42:59+00:00","dateModified":"2023-01-17T07:44:01+00:00","author":{"@id":"https:\/\/www.cyberrafting.com\/blog\/#\/schema\/person\/0533280d6685c57435a3151c387fff99"},"breadcrumb":{"@id":"https:\/\/www.cyberrafting.com\/blog\/how-to\/redirect-http-to-https\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.cyberrafting.com\/blog\/how-to\/redirect-http-to-https\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.cyberrafting.com\/blog\/how-to\/redirect-http-to-https\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.cyberrafting.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to 301 Redirect HTTP to HTTPS Using htaccess? Non-secure to Secure"}]},{"@type":"WebSite","@id":"https:\/\/www.cyberrafting.com\/blog\/#website","url":"https:\/\/www.cyberrafting.com\/blog\/","name":"Cyber Rafting Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.cyberrafting.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.cyberrafting.com\/blog\/#\/schema\/person\/0533280d6685c57435a3151c387fff99","name":"cyberrafting","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/c1f1c30a5a84d51fe015a59038822cd67358fd7fa1e202f74b946af36798f286?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/c1f1c30a5a84d51fe015a59038822cd67358fd7fa1e202f74b946af36798f286?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c1f1c30a5a84d51fe015a59038822cd67358fd7fa1e202f74b946af36798f286?s=96&d=mm&r=g","caption":"cyberrafting"},"sameAs":["https:\/\/www.cyberrafting.com\/blog"]}]}},"_links":{"self":[{"href":"https:\/\/www.cyberrafting.com\/blog\/wp-json\/wp\/v2\/posts\/723","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cyberrafting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cyberrafting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cyberrafting.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cyberrafting.com\/blog\/wp-json\/wp\/v2\/comments?post=723"}],"version-history":[{"count":2,"href":"https:\/\/www.cyberrafting.com\/blog\/wp-json\/wp\/v2\/posts\/723\/revisions"}],"predecessor-version":[{"id":834,"href":"https:\/\/www.cyberrafting.com\/blog\/wp-json\/wp\/v2\/posts\/723\/revisions\/834"}],"wp:attachment":[{"href":"https:\/\/www.cyberrafting.com\/blog\/wp-json\/wp\/v2\/media?parent=723"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cyberrafting.com\/blog\/wp-json\/wp\/v2\/categories?post=723"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cyberrafting.com\/blog\/wp-json\/wp\/v2\/tags?post=723"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}