I use AddRedirectToHttpsPermanent() to redirect to https.But there is no method to redirecting non-www.Also there is no web.config in a new version of asp.net core.