IIS Redirect 80 to 443
You set up an iis redirect 80 to 443 by adding a rewrite rule in Windows. This rule catches plain web traffic and sends it to the encrypted port. Teams often log in to the web server with full admin rights to make this change. Broad server roles let one bad change break every site on the host. How an iis redirect 80 to 443 works Web browsers often send the first request on the configured port by default. The configured port sends data in plain text across the network. Anyone on the network pa
End-to-End Encryption: the complete guide
Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.
You set up an iis redirect 80 to 443 by adding a rewrite rule in Windows. This rule catches plain web traffic and sends it to the encrypted port. Teams often log in to the web server with full admin rights to make this change. Broad server roles let one bad change break every site on the host.
How an iis redirect 80 to 443 works
Web browsers often send the first request on the configured port by default. The configured port sends data in plain text across the network. Anyone on the network path can read that plain text data. The configured port uses TLS to encrypt the traffic between the browser and the server.
First, the server admin binds a valid TLS certificate to the configured port on the site. The site must listen on both the configured port and the configured port at the same time. If you turn off the configured port completely, users who type plain domain names get an error.
Instead of using the basic redirect tool, admins install the URL Rewrite module for IIS. The basic redirect tool often causes an endless loop when both ports share one site folder. The URL Rewrite module checks whether the incoming request uses HTTPS. If HTTPS is off, the rule sends a permanent redirect response back to the browser. The rule keeps the original path and query string intact while switching the scheme to HTTPS.
Why you should avoid host-level SSL requirements
Many admins check the box to require SSL in the main site settings right away. That setting rejects the configured port requests before the rewrite module can run its rule. Users then see a forbidden error instead of moving to the encrypted site. You must leave that setting off so the configured port requests can reach the rewrite rule.
Load balancers can also cause a loop if they strip TLS before hitting the Windows server. In that setup, every request hits the Windows server on the configured port. The Windows server must check the forwarded protocol header instead of the local port state. Checking that header prevents the server from sending already encrypted users into a loop.
End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
What native server roles leave open
Setting up web rules keeps browser traffic safe in transit across the public web. Still, the way your team logs in to manage the Windows server matters just as much. Most teams grant full local admin roles so engineers can edit site files and rules.
Server roles only check who logs in at the start of a remote session. Once an engineer logs in, they can change any site setting or read local keys. Native Windows logs do not show every detail of what someone changes inside a session. A shared admin account makes it even harder to trace who broke a routing rule. Teams need a clear way to approve sensitive tasks and log every action in flight.
Add runtime guardrails and masking beside your databases and APIs
Login rules, role grants, and CI checks govern who connects to your stack. Yet any allowed script, engineer, or AI agent still runs commands with the full scope of its role. For workloads on Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes, SSH, or internal HTTP services, hoop.dev sits beside the service as an open-source proxy, a sidecar for your database or API.
Before a query runs, hoop.dev guardrails check the statement against your rules. An AI Analyzer you configure can score intent or hold risky calls for human review. Next, hoop.dev data masking rewrites sensitive fields in responses, and each verdict is logged per listener. Explore the MIT-licensed project on GitHub.
Frequently asked questions
Why does my IIS site get stuck in a redirect loop?
A loop happens when the rule sends HTTPS traffic back to itself on the configured port. Make sure your rule checks that HTTPS is off before it sends the redirect.
Should I use a permanent or temporary redirect status code?
Use a permanent status code once you test the rule and know it works well. Browsers and search engines will remember the HTTPS address and skip the configured port next time.
Can I set up the redirect in the site config file?
Yes, IIS stores URL Rewrite rules right inside the main site config file. Your team can track that file in version control to review changes before shipping them.
Related guides
In this post