{"id":19776,"date":"2020-11-29T16:12:29","date_gmt":"2020-11-29T16:12:29","guid":{"rendered":"http:\/\/www.devopsschool.com\/blog\/?p=19776"},"modified":"2021-02-23T08:22:27","modified_gmt":"2021-02-23T08:22:27","slug":"how-do-i-redirect-http-traffic-to-https-on-my-classic-load-balancer-in-elb","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/how-do-i-redirect-http-traffic-to-https-on-my-classic-load-balancer-in-elb\/","title":{"rendered":"How do I redirect HTTP traffic to HTTPS on my Classic Load Balancer in ELB?"},"content":{"rendered":"\n<p>HTTP requests and HTTP responses use header fields to send information about the HTTP messages. Header fields are colon-separated name-value pairs that are separated by a carriage return (CR) and a line feed (LF). A standard set of HTTP header fields is defined in RFC 2616, Message Headers. There are also non-standard HTTP headers available (and automatically added) that are widely used by the applications. Some of the non-standard HTTP headers have an X-Forwarded prefix. Classic Load Balancers support the following X-Forwarded headers.<\/p>\n\n\n\n<p>Turn off &#8220;SSL required&#8221; in WordPress. The correct solution is for WordPress to detect that the client connected to the LB via HTTPS and not redirect the client to HTTPS. The key is to process X-Forwarded-Proto header. Here is a link that will explain in more detail:<\/p>\n\n\n\n<p><strong>Reference<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\" id=\"block-5ded6f01-d41f-415d-aafc-a92b5a85c6e8\"><li>Php Server: HTTP_X_FORWARDED_SSL usage<\/li><li>How do I redirect HTTP traffic to HTTPS on my Classic Load Balancer in ELB?<\/li><li>WordPress with AWS ELB and SSL<\/li><li>WordPress instance behind AWS Application Load Balancer and trouble with implementing HTTPS<\/li><li>https:\/\/community.bitnami.com\/t\/wordpress-instance-behind-aws-application-load-balancer-and-trouble-with-implementing-https\/57847<\/li><li>https:\/\/docs.aws.amazon.com\/elasticloadbalancing\/latest\/classic\/x-forwarded-headers.html#x-forwarded-proto<\/li><li>https:\/\/stackoverflow.com\/questions\/30702490\/how-to-fix-wordpress-https-issues-when-behind-an-amazon-load-balancer<\/li><li>https:\/\/blog.lawrencemcdaniel.com\/wordpress-aws-elb-ssl\/<\/li><li>https:\/\/aws.amazon.com\/premiumsupport\/knowledge-center\/redirect-http-https-elb\/<\/li><li>https:\/\/docs.bitnami.com\/aws\/how-to\/configure-elb-ssl-aws\/<\/li><li>https:\/\/stackoverflow.com\/questions\/44741282\/php-server-http-x-forwarded-ssl-usage<\/li><li>https:\/\/blog.lawrencemcdaniel.com\/wordpress-aws-elb-ssl\/<\/li><li>https:\/\/blog.lawrencemcdaniel.com\/wordpress-aws-elb-ssl\/<\/li><li>https:\/\/docs.aws.amazon.com\/elasticloadbalancing\/latest\/classic\/x-forwarded-headers.html#x-forwarded-proto<\/li><li>https:\/\/community.bitnami.com\/t\/wordpress-instance-behind-aws-application-load-balancer-and-trouble-with-implementing-https\/57847\/2<\/li><li>https:\/\/stackoverflow.com\/questions\/51489257\/wordpress-nginx-alb-ssl-link-issue<\/li><li>https:\/\/stackoverflow.com\/questions\/30702490\/how-to-fix-wordpress-https-issues-when-behind-an-amazon-load-balancer<\/li><li>https:\/\/www.greeneggmedia.com\/blog\/entry\/fixing-wordpress-redirect-loop-with-aws-elastic-load-balancer<\/li><li>https:\/\/blog.lawrencemcdaniel.com\/wordpress-aws-elb-ssl\/<\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>HTTP requests and HTTP responses use header fields to send information about the HTTP messages. Header fields are colon-separated name-value pairs that are separated by a carriage return (CR) and&#8230; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[2],"tags":[],"class_list":["post-19776","post","type-post","status-publish","format-standard","hentry","category-uncategorised"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/19776","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=19776"}],"version-history":[{"count":3,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/19776\/revisions"}],"predecessor-version":[{"id":20442,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/19776\/revisions\/20442"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=19776"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=19776"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=19776"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}