Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!

Learn from Guru Rajesh Kumar and double your salary in just one year.


Get Started Now!

How do I redirect HTTP traffic to HTTPS on my Classic Load Balancer in ELB?

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.

Turn off “SSL required” 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:

Reference

  • Php Server: HTTP_X_FORWARDED_SSL usage
  • How do I redirect HTTP traffic to HTTPS on my Classic Load Balancer in ELB?
  • WordPress with AWS ELB and SSL
  • WordPress instance behind AWS Application Load Balancer and trouble with implementing HTTPS
  • https://community.bitnami.com/t/wordpress-instance-behind-aws-application-load-balancer-and-trouble-with-implementing-https/57847
  • https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/x-forwarded-headers.html#x-forwarded-proto
  • https://stackoverflow.com/questions/30702490/how-to-fix-wordpress-https-issues-when-behind-an-amazon-load-balancer
  • https://blog.lawrencemcdaniel.com/wordpress-aws-elb-ssl/
  • https://aws.amazon.com/premiumsupport/knowledge-center/redirect-http-https-elb/
  • https://docs.bitnami.com/aws/how-to/configure-elb-ssl-aws/
  • https://stackoverflow.com/questions/44741282/php-server-http-x-forwarded-ssl-usage
  • https://blog.lawrencemcdaniel.com/wordpress-aws-elb-ssl/
  • https://blog.lawrencemcdaniel.com/wordpress-aws-elb-ssl/
  • https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/x-forwarded-headers.html#x-forwarded-proto
  • https://community.bitnami.com/t/wordpress-instance-behind-aws-application-load-balancer-and-trouble-with-implementing-https/57847/2
  • https://stackoverflow.com/questions/51489257/wordpress-nginx-alb-ssl-link-issue
  • https://stackoverflow.com/questions/30702490/how-to-fix-wordpress-https-issues-when-behind-an-amazon-load-balancer
  • https://www.greeneggmedia.com/blog/entry/fixing-wordpress-redirect-loop-with-aws-elastic-load-balancer
  • https://blog.lawrencemcdaniel.com/wordpress-aws-elb-ssl/
DevOps Certification, SRE Certification, and DevSecOps Certification by DevOpsSchool

Explore our DevOps Certification, SRE Certification, and DevSecOps Certification programs at DevOpsSchool. Gain the expertise needed to excel in your career with hands-on training and globally recognized certifications.