Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

236
Views
Redirection from www to https

I have a subdomain called for example : hello.example.com. I can access this url using hello.example.com or https://hello.example.com.

The problem is that some of our customers use www.hello.example.com which doesnt show the website.I tried multiple redirection methods. But none is working perfectly.

Our environment : The website is hosted in 4 aws instances with 2 haproxy load balancers(total 6 instances). The domain is routed in aws Route 53.

I Tried 3 methods: 1. Adding a redirect rule in haproxy.cfg file "redirect prefix hello.example.com code 301 if { hdr(host) -i www.hello.example.com }"

  1. Adding rewrite rule in .htaccess file in my document root

  2. By adding www.hello.example.com in route53 ad route it to a s3 bucket with same name and using static website hosting to redirect it to hello.example.com

I am getting ssl certificate error while using the 1st method. I think this has something to do with the url being a subdomain.I have wildcard certificate for *.example.com . So this doesnt work for www.hello.example.com

The second method doesnt do anything.

And with third method i sometimes get the website using www, but not always. If i clear my cache and then search for it i will git using www, but only for 1 time.

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!