Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

233
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda