{"id":1091,"date":"2019-09-25T11:33:39","date_gmt":"2019-09-25T11:33:39","guid":{"rendered":"https:\/\/www.agmwebhosting.com\/blog\/?p=1091"},"modified":"2019-09-25T11:51:15","modified_gmt":"2019-09-25T11:51:15","slug":"redirect-http-traffic-to-https","status":"publish","type":"post","link":"https:\/\/www.agmwebhosting.com\/blog\/redirect-http-traffic-to-https\/","title":{"rendered":"How to Automatically Redirect HTTP Traffic to HTTPS?"},"content":{"rendered":"\n<p>Most people struggle to understand how to automatically redirect http traffic to https, regardless of the tactic they use. <\/p>\n\n\n\n<p>Sound like you? Fret not, this post will help you accomplish that in a much easy way.<\/p>\n\n\n\n<p>Don\u2019t believe me? Here are some of the easy ways that we\u2019ve built to AGM users to redirect http traffic to https:<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">HTTPS Definition and its Basics<\/h2>\n\n\n\n<p>Hypertext Transfer Protocol Secure (<strong>HTTPS<\/strong>) is an extension of the Hypertext Transfer Protocol (HTTP) used&nbsp;for secure communication over a computer network and <em>HTTPS<\/em>&nbsp;is also encrypted in order to increase the security of data transfer. <\/p>\n\n\n\n<p>For all intents and purposes,&nbsp;<a href=\"http:\/\/www.biztechmagazine.com\/article\/2007\/07\/http-vs-https\" target=\"_blank\" rel=\"noopener\">HTTPS&nbsp;is&nbsp;HTTP<\/a>, HTTPS is just the secure version of HTTP.<\/p>\n\n\n\n<p>To get technical on you, the main difference is that it just uses&nbsp;TCP&nbsp;port 443 by default thus making&nbsp;HTTP&nbsp;and&nbsp;HTTPS&nbsp;two separate communications.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Are there any SEO&nbsp;Advantages of Switching to&nbsp;HTTPS?<\/h3>\n\n\n\n<p>The benefits are obvious: maximize data security on the web, more secure and more private, increase ROI, improve search engine ranking, encrypt users sensitive information.<\/p>\n\n\n\n<p>Also, Recently Google has&nbsp;<a href=\"http:\/\/searchengineland.com\/google-starts-giving-ranking-boost-secure-httpsssl-sites-199446\" target=\"_blank\" rel=\"noopener\">officially announced<\/a>&nbsp;that switching your website traffic from HTTP to&nbsp;HTTPS&nbsp;will give you a minor ranking boost.<\/p>\n\n\n\n<p>So it\u2019s that simple, right? If Google says to do it, then why not we do it.<\/p>\n\n\n\n<p>It is obvious that&nbsp;HTTPS&nbsp;offers more security, so it is definitely the choice to put you in Google\u2019s good graces. There are also some additional&nbsp;SEO&nbsp;benefits for you to consider when opting to do it. <\/p>\n\n\n\n<p>Here\u2019s why you should redirect all your http traffic to https:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>It may help improve search engine rankings.<\/li><li>It increases ROI.<\/li><li>It may turn your visitors into potential customers with trust.<\/li><\/ol>\n\n\n\n<p>No matter what side you are on\u2014being the website user or your own site developer\u2014a good online experience tends to involve a trusted third party and good data encryption.<\/p>\n\n\n\n<p>In order to understand how to achieve this and better understand how you can automatically redirect http traffic to https, it\u2019s important to first learn the basics steps to accomplish this. Below I&#8217;ll share an easy guide to help you understand how you can redirect all your http traffic to https.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>How to Automatically Redirect all your http traffic to https<\/strong>?<\/h2>\n\n\n\n<p>If you have a secure socket layer certificate (<strong>SSL<\/strong>) on your website, you can automatically redirect all your HTTP visitors to the secured (HTTPS) version of your site for a secure connection which ensures data sent to and from your website is securely encrypted. AGM Web Hosting uses cPanel and there is a really simple step in cPanel that will help you accomplish this.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/qph.fs.quoracdn.net\/main-qimg-421bec7bb50e7eed87be1f031c85bc14\" alt=\"\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/qph.fs.quoracdn.net\/main-qimg-c240cf496d4f985d540c88f9cb367e9c\" alt=\"How to Automatically Redirect HTTP Traffic to HTTPS\"\/><\/figure>\n\n\n\n<p><strong>Create\/Add or Edit the .htaccess file using AGM cPanel\u2019s File Manager<\/strong><\/p>\n\n\n\n<p>Now Let\u2019s move ahead and add or edit the .htaccess file using <a href=\"http:\/\/agmwebhosting.com\">AGM Web Hosting<\/a> cPanel\u2019s File Manager.<\/p>\n\n\n\n<p>In the cPanel Dashboard, select the <strong>File Manager<\/strong> icon, which will be found in the <strong>Files<\/strong> section.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Firstly Login into cPanel.<\/li><li>Then, Click <strong>\u2018File Manager\u2019<\/strong> in the <strong>\u2018Files\u2019<\/strong> section.<\/li><\/ul>\n\n\n\n<p>Now, Click the <strong>\u2018<\/strong><strong>Settings\u2019<\/strong> button at the top right of the page.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/qph.fs.quoracdn.net\/main-qimg-777c5610f286d6c00f8de30bbcb347e0\" alt=\"How to Automatically Redirect HTTP Traffic to HTTPS\"\/><\/figure>\n\n\n\n<p>In the <strong>Preferences<\/strong> panel that appears right after clicking the <strong>\u2018settings\u2019<\/strong> button, ensure <strong>Show Hidden Files (dotfiles)<\/strong> is checked and Hit the <strong>\u2018<\/strong><strong>Save\u2019 <\/strong>button.<\/p>\n\n\n\n<p>Now, once you navigate on the left bar inside file manager panel, click on the <strong>public_html<\/strong>, <strong>.htaccess<\/strong> needs to be displayed right there somewhere inside it as shown in the below image.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/qph.fs.quoracdn.net\/main-qimg-1c41955a1aed69b7fc5687255c8ff3c3\" alt=\"How to Automatically Redirect HTTP Traffic to HTTPS\"\/><\/figure>\n\n\n\n<p>Once you select the .htaccess file and highlight it, navigate directly at the top of the page and click on <strong>\u2018Edit button\u2019<\/strong>. Inside the Edit panel, again click on the <strong>\u2018<\/strong><strong>Edit\u2019<\/strong> once again.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/qph.fs.quoracdn.net\/main-qimg-40ff82b108660b79c0b9ddd63dfde281\" alt=\"\"\/><\/figure>\n\n\n\n<p>The <strong>cPanel text editor<\/strong> will now open. Now, kindly insert the below-provided code to automatically redirect any traffic destined for <strong>http:<\/strong><em> to <\/em><strong><em>https:<\/em><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">RewriteEngine On<br>RewriteCond %{HTTPS} off<br>RewriteRule ^(.*)$ https:\/\/%{HTTP_HOST}%{REQUEST_URI} [L,R=301]<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/qph.fs.quoracdn.net\/main-qimg-36e4a859bf68c8accecf58b921de43bc\" alt=\"\"\/><\/figure>\n\n\n\n<p>Click <strong>Save Changes<\/strong> to complete the redirection to the secure URL.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Congratulations!<\/strong> You now successfully redirect http traffic to https.<\/h4>\n\n\n\n<p>You have now forced your site to redirect to its secure URL via a configuration file(.htaccess) and adding some code to it.<\/p>\n\n\n\n<p>If you notice any problems or if you need any help, please open a support ticket logging in your AGM client area. Wondering how to raise a support ticket? Fret not, we have an easy guide for you, <a href=\"https:\/\/www.youtube.com\/watch?v=4ntsmTpx0xc&amp;t=109s\" target=\"_blank\" rel=\"noopener\">click here<\/a> to learn more details.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Most people struggle to understand how to automatically redirect http traffic to https, regardless of the tactic they use. Sound like you? Fret not, this post will help you accomplish&#8230; <\/p>\n","protected":false},"author":2,"featured_media":1092,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[223,224,116],"class_list":["post-1091","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tech","tag-automatically-redirect-http-traffic-to-https","tag-how-to-automatically-redirect-http-traffic-to-https","tag-ssl-certificate"],"_links":{"self":[{"href":"https:\/\/www.agmwebhosting.com\/blog\/wp-json\/wp\/v2\/posts\/1091"}],"collection":[{"href":"https:\/\/www.agmwebhosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.agmwebhosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.agmwebhosting.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.agmwebhosting.com\/blog\/wp-json\/wp\/v2\/comments?post=1091"}],"version-history":[{"count":9,"href":"https:\/\/www.agmwebhosting.com\/blog\/wp-json\/wp\/v2\/posts\/1091\/revisions"}],"predecessor-version":[{"id":1134,"href":"https:\/\/www.agmwebhosting.com\/blog\/wp-json\/wp\/v2\/posts\/1091\/revisions\/1134"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.agmwebhosting.com\/blog\/wp-json\/wp\/v2\/media\/1092"}],"wp:attachment":[{"href":"https:\/\/www.agmwebhosting.com\/blog\/wp-json\/wp\/v2\/media?parent=1091"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.agmwebhosting.com\/blog\/wp-json\/wp\/v2\/categories?post=1091"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.agmwebhosting.com\/blog\/wp-json\/wp\/v2\/tags?post=1091"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}