I need to redirect non-www urls to www url for both http and https urls. I tried following rules in web.config.
Since 2018, consider to use everytime https (SSL) !
So I use redirect to www and to https together.
more info here : https://forums.realmacsoftware.com/t/effective-july-2018-google-s-chrome-browser-will-mark-non-https-sites-as-not-secure/18597