hi
If for IIS you can use URL Rewrite to do it
first you have to download it and install it on your IIS Server, It is an extension from Microsoft for IIS
https://www.iis.net/downloads/microsoft/url-rewrite
you can find many videos on how to use it or flow these steps
https://www.namecheap.com/support/knowledgebase/article.aspx/9953/38/iis-redirect-http-to-https
regards