May 27, 2022, noon | /u/foxtrot90210

cybersecurity www.reddit.com

To my understanding they do the same thing but work differently, please correct me if I am wrong.

`HSTS` \- user visits http://www.mysite.com, the website will automatically force the user to go to [https://www.mysite.com](https://www.mysite.com). The user never sees the unsecure http version.

​

`301 redirect` \- user visits [https://www.mysite.com](https://www.mysite.com). They ***DO*** establish a connection to the unsecured site, but then redirected to [https://www.mysite.com](https://www.mysite.com).

​

301 redirect is good, but for that split second a MITM attack can happen correct?

cybersecurity hsts http vs

IT Security Engineer

@ Timocom GmbH | Erkrath, Germany

Consultant SOC / CERT H/F

@ Hifield | Sèvres, France

Privacy Engineer, Implementation Review

@ Meta | Menlo Park, CA | Seattle, WA

Cybersecurity Specialist (Security Engineering)

@ Triton AI Pte Ltd | Singapore, Singapore, Singapore

SOC Analyst

@ Rubrik | Palo Alto

Consultant Tech Advisory H/F

@ Hifield | Sèvres, France