Previous
Left Arrow
Using PowerShell to set websites to only use non-www instead of www
Current Code Entry
Go Back To Code List
[PowerShell]
  • Using PowerShell to set our websites to only use HTTPS

    Article Entry Date: April 17,2026 @ 08:49:28 / Last Updated On: April 17,2026 @ 08:53:20
In this Article, we will look at a script that sets all websites to use HTTPS instead of HTTP.


Making sure our website is secure for our visitors and also to make search engines like Google happy, we must have HTTPS enabled on all our websites.
The best way to handle this is to place the code in our applicationHost.config file so it affects all websites, rather than editing every web.config file in every website.


I ran this on one of my [ARR Servers] ([Application Request Routing]), which is in a [Shared-Configuration] with several others.
Once you update one, all get updated.
Since the ARR is the [Front-End], this is the only place we need to invoke this command.





Other Articles Related to this Entry.


Using PowerShell to set websites to only use non-www instead of www«