Tools / Redirect Generator
Redirect Generator
Get redirect rules for the two common web servers.
Apache (.htaccess)
Nginx (server block)
Back up the file before editing it, and test with curl -IL. Put the HTTPS rule before the other rules, and keep a single layer in charge of each redirect, or you may create a loop.