{"id":70,"date":"2021-04-06T11:17:22","date_gmt":"2021-04-06T05:47:22","guid":{"rendered":"https:\/\/www.7hosty.com\/blog\/?p=70"},"modified":"2021-04-06T11:17:22","modified_gmt":"2021-04-06T05:47:22","slug":"force-http-to-https-using-htaccess-2021","status":"publish","type":"post","link":"https:\/\/www.7hosty.com\/blog\/force-http-to-https-using-htaccess-2021\/","title":{"rendered":"Force Http To Https using .htaccess (2021)"},"content":{"rendered":"<p>Your website is now accessible via HTTP and HTTPS after you install an SSL certificate. However, it is preferable to use only HTTPS because it encrypts and secures the data on your website. Although 7Hosty allows users to customize this setting with a single click, you can also force HTTPS connections using the\u00a0 .htaccess file. We&#8217;ll show you how in this article.<\/p>\n<p><img data-recalc-dims=\"1\" fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter size-medium wp-image-73\" src=\"https:\/\/i0.wp.com\/www.7hosty.com\/blog\/wp-content\/uploads\/2021\/04\/http-to-https.png?resize=300%2C201&#038;ssl=1\" alt=\" to https redirect htaccess\" width=\"300\" height=\"201\" srcset=\"https:\/\/i0.wp.com\/www.7hosty.com\/blog\/wp-content\/uploads\/2021\/04\/http-to-https.png?resize=300%2C201&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.7hosty.com\/blog\/wp-content\/uploads\/2021\/04\/http-to-https.png?resize=768%2C514&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.7hosty.com\/blog\/wp-content\/uploads\/2021\/04\/http-to-https.png?resize=320%2C214&amp;ssl=1 320w, https:\/\/i0.wp.com\/www.7hosty.com\/blog\/wp-content\/uploads\/2021\/04\/http-to-https.png?resize=640%2C428&amp;ssl=1 640w, https:\/\/i0.wp.com\/www.7hosty.com\/blog\/wp-content\/uploads\/2021\/04\/http-to-https.png?resize=360%2C241&amp;ssl=1 360w, https:\/\/i0.wp.com\/www.7hosty.com\/blog\/wp-content\/uploads\/2021\/04\/http-to-https.png?resize=720%2C482&amp;ssl=1 720w, https:\/\/i0.wp.com\/www.7hosty.com\/blog\/wp-content\/uploads\/2021\/04\/http-to-https.png?resize=520%2C347&amp;ssl=1 520w, https:\/\/i0.wp.com\/www.7hosty.com\/blog\/wp-content\/uploads\/2021\/04\/http-to-https.png?w=800&amp;ssl=1 800w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<h3>Force HTTPS on ALL Traffic Using Htaccess :<\/h3>\n<p>301 redirects are one of the many functions you can perform with .htaccess, which permanently redirects an old URL to a new one. Follow these steps to enable the function that forces HTTPS on all incoming traffic:<\/p>\n<ol>\n<li>In your cPanel, go to File Manager and open .htaccess in the public html folder. If you can&#8217;t find it, Be sure to Create It or unhide it.<\/li>\n<li>Scroll down to <code>RewriteEngine On<\/code> and add the following code lines below it:\n<div class=\"wp-block-codemirror-blocks code-block \">\n<pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text\/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;lineWrapping&quot;:true,&quot;styleActiveLine&quot;:true,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}\">RewriteEngine On \r\nRewriteCond %{HTTPS} off \r\nRewriteRule ^(.*)$ https:\/\/%{HTTP_HOST}%{REQUEST_URI} [L,R=301]<\/pre>\n<\/div>\n<\/li>\n<li><strong>Save<\/strong> the changes.<\/li>\n<\/ol>\n<div class=\"su-note\"  style=\"border-color:#d2a800;border-radius:10px;-moz-border-radius:10px;-webkit-border-radius:10px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#ecc20c;border-color:#ffffd8;color:#000000;border-radius:10px;-moz-border-radius:10px;-webkit-border-radius:10px;\">Note: Make sure that the line RewriteEngine On is not repeated twice. In case the line already exists, simply copy the rest of the code without it.<\/div><\/div>\n<h3>Force HTTPS on Particular Domain Using Htaccess:<\/h3>\n<p>Consider the following scenario: you have two domains: <strong>http:\/\/domain1.com<\/strong> and <strong>http:\/\/domain2.com<\/strong>. While both domains access the same website, only the first should be redirected to the HTTPS edition. In this case, the following code must be used:<\/p>\n<p>&nbsp;<\/p>\n<div class=\"wp-block-codemirror-blocks code-block \">\n<pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text\/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;lineWrapping&quot;:true,&quot;styleActiveLine&quot;:true,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}\">RewriteEngine On \r\nRewriteCond %{HTTP_HOST} ^domain1.com [NC] \r\nRewriteCond %{HTTPS} off \r\nRewriteRule ^(.*)$ https:\/\/%{HTTP_HOST}%{REQUEST_URI} [R=301,L]<\/pre>\n<\/div>\n<p>Make sure to replace <strong>domain1<\/strong> with the actual domain you\u2019re trying to force HTTPS on.<\/p>\n<h3>Force HTTPS On Particular Folder:<\/h3>\n<p>You may also use the .htaccess file to force HTTPS on individual folders. The file should, however, be saved in the folder that will be used for the HTTPS link.<\/p>\n<p>&nbsp;<\/p>\n<div class=\"wp-block-codemirror-blocks code-block \">\n<pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text\/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;lineWrapping&quot;:true,&quot;styleActiveLine&quot;:true,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}\">RewriteEngine On \r\nRewriteCond %{HTTPS} off \r\nRewriteRule ^(folder1|folder2|folder3) https:\/\/%{HTTP_HOST}%{REQUEST_URI} [R=301,L]<\/pre>\n<\/div>\n<p>Make sure the <strong>folder<\/strong> references are changed to the correct directory names.<\/p>\n<p>Clear your browser&#8217;s cache and try connecting to your site via HTTP after you&#8217;ve made the changes. The browser would guide you to the HTTPS version if everything was entered correctly.<\/p>\n<h3>Conclusion<\/h3>\n<p>Congratulations! You have successfully updated your .htaccess file to redirect all HTTP traffic to HTTPS, your website&#8217;s secure edition. There may be other ways to allow this function depending on the platform on which you built your website. Plugins, for example, can be used to customize your WordPress or PrestaShop site to work with HTTPS.<\/p>\n<p><strong>Also Checkout :\u00a0<a href=\"https:\/\/www.7hosty.com\/blog\/how-to-login-into-cpanel-account\/\" target=\"_blank\" rel=\"noopener\">How To Login Into cPanel Account<\/a><\/strong><\/p>\n<div class=\"su-note\"  style=\"border-color:#e5e5e5;border-radius:10px;-moz-border-radius:10px;-webkit-border-radius:10px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#fff;border-color:#ffffff;color:#000000;border-radius:10px;-moz-border-radius:10px;-webkit-border-radius:10px;\">\n<p>Follow Us On :<\/p>\n<p><a href=\"https:\/\/www.facebook.com\/7hostyglobal\" target=\"_blank\" rel=\"noopener noreferrer\">Facebook<\/a><\/p>\n<p><a href=\"https:\/\/twitter.com\/7hosty\" target=\"_blank\" rel=\"noopener noreferrer\">Twitter<\/a><\/p>\n<p><a href=\"https:\/\/instagram.com\/7hosty\" target=\"_blank\" rel=\"noopener noreferrer\">Instagram<\/a><\/p>\n<\/div><\/div>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Your website is now accessible via HTTP and HTTPS after you install an SSL certificate. However, it is preferable to use only HTTPS because it encrypts&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":52,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[11],"tags":[14,13,12],"class_list":["post-70","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ssl","tag-htaccess","tag-https-using-htaccess","tag-ssl"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Force Http To Https using .htaccess (2021) - 7Hosty Blog<\/title>\n<meta name=\"description\" content=\"If you want to redirect from HTTP to HTTPS? See this step-by-step guide for using htaccess to push all visitors and traffic to HTTPS.\" \/>\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.7hosty.com\/blog\/force-http-to-https-using-htaccess-2021\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Force Http To Https using .htaccess (2021) - 7Hosty Blog\" \/>\n<meta property=\"og:description\" content=\"If you want to redirect from HTTP to HTTPS? See this step-by-step guide for using htaccess to push all visitors and traffic to HTTPS.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.7hosty.com\/blog\/force-http-to-https-using-htaccess-2021\/\" \/>\n<meta property=\"og:site_name\" content=\"7Hosty Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/facebook.com\/7hostyglobal\" \/>\n<meta property=\"article:published_time\" content=\"2021-04-06T05:47:22+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.7hosty.com\/blog\/wp-content\/uploads\/2020\/11\/blog-post.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"1080\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Aakash Kothari\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@7hosty\" \/>\n<meta name=\"twitter:site\" content=\"@7hosty\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Aakash Kothari\" \/>\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:\\\/\\\/www.7hosty.com\\\/blog\\\/force-http-to-https-using-htaccess-2021\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.7hosty.com\\\/blog\\\/force-http-to-https-using-htaccess-2021\\\/\"},\"author\":{\"name\":\"Aakash Kothari\",\"@id\":\"https:\\\/\\\/www.7hosty.com\\\/blog\\\/#\\\/schema\\\/person\\\/9be40a13b24946ab495caf385fda9890\"},\"headline\":\"Force Http To Https using .htaccess (2021)\",\"datePublished\":\"2021-04-06T05:47:22+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.7hosty.com\\\/blog\\\/force-http-to-https-using-htaccess-2021\\\/\"},\"wordCount\":416,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.7hosty.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.7hosty.com\\\/blog\\\/force-http-to-https-using-htaccess-2021\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/www.7hosty.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/blog-post.jpg?fit=1920%2C1080&ssl=1\",\"keywords\":[\"htaccess\",\"https using htaccess\",\"ssl\"],\"articleSection\":[\"SSL\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.7hosty.com\\\/blog\\\/force-http-to-https-using-htaccess-2021\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.7hosty.com\\\/blog\\\/force-http-to-https-using-htaccess-2021\\\/\",\"url\":\"https:\\\/\\\/www.7hosty.com\\\/blog\\\/force-http-to-https-using-htaccess-2021\\\/\",\"name\":\"Force Http To Https using .htaccess (2021) - 7Hosty Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.7hosty.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.7hosty.com\\\/blog\\\/force-http-to-https-using-htaccess-2021\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.7hosty.com\\\/blog\\\/force-http-to-https-using-htaccess-2021\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/www.7hosty.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/blog-post.jpg?fit=1920%2C1080&ssl=1\",\"datePublished\":\"2021-04-06T05:47:22+00:00\",\"description\":\"If you want to redirect from HTTP to HTTPS? See this step-by-step guide for using htaccess to push all visitors and traffic to HTTPS.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.7hosty.com\\\/blog\\\/force-http-to-https-using-htaccess-2021\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.7hosty.com\\\/blog\\\/force-http-to-https-using-htaccess-2021\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.7hosty.com\\\/blog\\\/force-http-to-https-using-htaccess-2021\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/www.7hosty.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/blog-post.jpg?fit=1920%2C1080&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/www.7hosty.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/blog-post.jpg?fit=1920%2C1080&ssl=1\",\"width\":1920,\"height\":1080,\"caption\":\"7Hosty Blog\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.7hosty.com\\\/blog\\\/force-http-to-https-using-htaccess-2021\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.7hosty.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Force Http To Https using .htaccess (2021)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.7hosty.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.7hosty.com\\\/blog\\\/\",\"name\":\"7Hosty Blog\",\"description\":\"Official 7hosty Blog\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.7hosty.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.7hosty.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.7hosty.com\\\/blog\\\/#organization\",\"name\":\"7Hosty\",\"url\":\"https:\\\/\\\/www.7hosty.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.7hosty.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/i1.wp.com\\\/www.7hosty.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/08\\\/logo.png?fit=972%2C204&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i1.wp.com\\\/www.7hosty.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/08\\\/logo.png?fit=972%2C204&ssl=1\",\"width\":972,\"height\":204,\"caption\":\"7Hosty\"},\"image\":{\"@id\":\"https:\\\/\\\/www.7hosty.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/facebook.com\\\/7hostyglobal\",\"https:\\\/\\\/x.com\\\/7hosty\",\"https:\\\/\\\/instagram.com\\\/7hosty\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/7hosty\\\/\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCrkumTZymWlarjWWXt6XoJw\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.7hosty.com\\\/blog\\\/#\\\/schema\\\/person\\\/9be40a13b24946ab495caf385fda9890\",\"name\":\"Aakash Kothari\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/85b530c9042a742b5284beea5b2be1cf572d845317f20b09f5503a042b82b50e?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/85b530c9042a742b5284beea5b2be1cf572d845317f20b09f5503a042b82b50e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/85b530c9042a742b5284beea5b2be1cf572d845317f20b09f5503a042b82b50e?s=96&d=mm&r=g\",\"caption\":\"Aakash Kothari\"},\"sameAs\":[\"https:\\\/\\\/www.7hosty.com\"],\"url\":\"https:\\\/\\\/www.7hosty.com\\\/blog\\\/author\\\/aakash\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Force Http To Https using .htaccess (2021) - 7Hosty Blog","description":"If you want to redirect from HTTP to HTTPS? See this step-by-step guide for using htaccess to push all visitors and traffic to HTTPS.","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.7hosty.com\/blog\/force-http-to-https-using-htaccess-2021\/","og_locale":"en_US","og_type":"article","og_title":"Force Http To Https using .htaccess (2021) - 7Hosty Blog","og_description":"If you want to redirect from HTTP to HTTPS? See this step-by-step guide for using htaccess to push all visitors and traffic to HTTPS.","og_url":"https:\/\/www.7hosty.com\/blog\/force-http-to-https-using-htaccess-2021\/","og_site_name":"7Hosty Blog","article_publisher":"https:\/\/facebook.com\/7hostyglobal","article_published_time":"2021-04-06T05:47:22+00:00","og_image":[{"width":1920,"height":1080,"url":"https:\/\/www.7hosty.com\/blog\/wp-content\/uploads\/2020\/11\/blog-post.jpg","type":"image\/jpeg"}],"author":"Aakash Kothari","twitter_card":"summary_large_image","twitter_creator":"@7hosty","twitter_site":"@7hosty","twitter_misc":{"Written by":"Aakash Kothari","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.7hosty.com\/blog\/force-http-to-https-using-htaccess-2021\/#article","isPartOf":{"@id":"https:\/\/www.7hosty.com\/blog\/force-http-to-https-using-htaccess-2021\/"},"author":{"name":"Aakash Kothari","@id":"https:\/\/www.7hosty.com\/blog\/#\/schema\/person\/9be40a13b24946ab495caf385fda9890"},"headline":"Force Http To Https using .htaccess (2021)","datePublished":"2021-04-06T05:47:22+00:00","mainEntityOfPage":{"@id":"https:\/\/www.7hosty.com\/blog\/force-http-to-https-using-htaccess-2021\/"},"wordCount":416,"commentCount":0,"publisher":{"@id":"https:\/\/www.7hosty.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.7hosty.com\/blog\/force-http-to-https-using-htaccess-2021\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/www.7hosty.com\/blog\/wp-content\/uploads\/2020\/11\/blog-post.jpg?fit=1920%2C1080&ssl=1","keywords":["htaccess","https using htaccess","ssl"],"articleSection":["SSL"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.7hosty.com\/blog\/force-http-to-https-using-htaccess-2021\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.7hosty.com\/blog\/force-http-to-https-using-htaccess-2021\/","url":"https:\/\/www.7hosty.com\/blog\/force-http-to-https-using-htaccess-2021\/","name":"Force Http To Https using .htaccess (2021) - 7Hosty Blog","isPartOf":{"@id":"https:\/\/www.7hosty.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.7hosty.com\/blog\/force-http-to-https-using-htaccess-2021\/#primaryimage"},"image":{"@id":"https:\/\/www.7hosty.com\/blog\/force-http-to-https-using-htaccess-2021\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/www.7hosty.com\/blog\/wp-content\/uploads\/2020\/11\/blog-post.jpg?fit=1920%2C1080&ssl=1","datePublished":"2021-04-06T05:47:22+00:00","description":"If you want to redirect from HTTP to HTTPS? See this step-by-step guide for using htaccess to push all visitors and traffic to HTTPS.","breadcrumb":{"@id":"https:\/\/www.7hosty.com\/blog\/force-http-to-https-using-htaccess-2021\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.7hosty.com\/blog\/force-http-to-https-using-htaccess-2021\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.7hosty.com\/blog\/force-http-to-https-using-htaccess-2021\/#primaryimage","url":"https:\/\/i0.wp.com\/www.7hosty.com\/blog\/wp-content\/uploads\/2020\/11\/blog-post.jpg?fit=1920%2C1080&ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.7hosty.com\/blog\/wp-content\/uploads\/2020\/11\/blog-post.jpg?fit=1920%2C1080&ssl=1","width":1920,"height":1080,"caption":"7Hosty Blog"},{"@type":"BreadcrumbList","@id":"https:\/\/www.7hosty.com\/blog\/force-http-to-https-using-htaccess-2021\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.7hosty.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Force Http To Https using .htaccess (2021)"}]},{"@type":"WebSite","@id":"https:\/\/www.7hosty.com\/blog\/#website","url":"https:\/\/www.7hosty.com\/blog\/","name":"7Hosty Blog","description":"Official 7hosty Blog","publisher":{"@id":"https:\/\/www.7hosty.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.7hosty.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.7hosty.com\/blog\/#organization","name":"7Hosty","url":"https:\/\/www.7hosty.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.7hosty.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/i1.wp.com\/www.7hosty.com\/blog\/wp-content\/uploads\/2020\/08\/logo.png?fit=972%2C204&ssl=1","contentUrl":"https:\/\/i1.wp.com\/www.7hosty.com\/blog\/wp-content\/uploads\/2020\/08\/logo.png?fit=972%2C204&ssl=1","width":972,"height":204,"caption":"7Hosty"},"image":{"@id":"https:\/\/www.7hosty.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/facebook.com\/7hostyglobal","https:\/\/x.com\/7hosty","https:\/\/instagram.com\/7hosty","https:\/\/www.linkedin.com\/company\/7hosty\/","https:\/\/www.youtube.com\/channel\/UCrkumTZymWlarjWWXt6XoJw"]},{"@type":"Person","@id":"https:\/\/www.7hosty.com\/blog\/#\/schema\/person\/9be40a13b24946ab495caf385fda9890","name":"Aakash Kothari","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/85b530c9042a742b5284beea5b2be1cf572d845317f20b09f5503a042b82b50e?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/85b530c9042a742b5284beea5b2be1cf572d845317f20b09f5503a042b82b50e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/85b530c9042a742b5284beea5b2be1cf572d845317f20b09f5503a042b82b50e?s=96&d=mm&r=g","caption":"Aakash Kothari"},"sameAs":["https:\/\/www.7hosty.com"],"url":"https:\/\/www.7hosty.com\/blog\/author\/aakash\/"}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.7hosty.com\/blog\/wp-content\/uploads\/2020\/11\/blog-post.jpg?fit=1920%2C1080&ssl=1","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.7hosty.com\/blog\/wp-json\/wp\/v2\/posts\/70","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.7hosty.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.7hosty.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.7hosty.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.7hosty.com\/blog\/wp-json\/wp\/v2\/comments?post=70"}],"version-history":[{"count":0,"href":"https:\/\/www.7hosty.com\/blog\/wp-json\/wp\/v2\/posts\/70\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.7hosty.com\/blog\/wp-json\/wp\/v2\/media\/52"}],"wp:attachment":[{"href":"https:\/\/www.7hosty.com\/blog\/wp-json\/wp\/v2\/media?parent=70"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.7hosty.com\/blog\/wp-json\/wp\/v2\/categories?post=70"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.7hosty.com\/blog\/wp-json\/wp\/v2\/tags?post=70"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}