Http > https _redirects not working as expected

Hey there!

I have a few Netlify sites and this has previously worked for me. Googling + searching here hasn’t yielded an answer yet so thought I’d ask.

At the top of my _redirects file I have:

http://help.getvero.com https://help.getvero.com 301!
http://help.getvero.com/* https://help.getvero.com/:splat 301!

…yet when I visit http://help.getvero.com or Connect - Vero I am not redirected.

I am 100% sure I’m doing something crazy. I have Pretty URLs turned on in the Netlify build/deploy settings.

Thanks!

Hi, @chexton,

I believe the second redirect you have should work:

http://help.getvero.com/* https://help.getvero.com/:splat 301!

Could you try removing the first redirect from the _redirects file?

http://help.getvero.com https://help.getvero.com 301!

Let us know if you’re still having issues. Thanks!

That makes sense @Melvin. I’ve updated it so now it just has:

http://help.getvero.com/* https://help.getvero.com/:splat 301!

Have tested with httpstatus.io and still not getting the redirect on either:

Odd!

Hi @chexton,

We’re checking what could be the cause of this (as you should not need a redirect in the first place) and we’ll update the thread once we have more information.

Thanks @hrishikesh, no problems.

Hey @hrishikesh. Did you have any luck investigating further? Thanks.

:wave: @chexton ,

Thanks for your patience! Could you try clicking on the ‘Force HTTPS’ button in Site settings > Domain management > HTTPS and see if that redirects all traffic from HTTP to HTTPS automatically without the need for redirect rules?

Hey @Audrey: my understanding is this setups HSTS, yes? There are some other reasons we don’t quite want to do that yet. If my understanding is wrong on the HSTS, let me know!

Hey @chexton :We were troubleshooting this as a team just now and have enabled the force SSL flag on the site. We’ve confirmed that HSTS headers were not set on the custom domains. Please let us know if you do see any issues and would like us to roll back the flag!

Thanks @audrey. That is indeed working now but I think it has enabled HSTS as per the response header:

Strict-Transport-Security: max-age=31536000

Is that right? In any case, as it’s on a subdomain it should be okay. However we wouldn’t want to do this on our root domain just yet. Thanks!

Ah, you’re right @chexton, HSTS was enabled. Sorry we’ve missed that! :face_with_diagonal_mouth:

I see your root domain hasn’t been added to the site yet and it has DNS records pointing away from Netlify so you should be good for now!