Redirect HTTP to HTTPS on IIS Windows Server

Redirect HTTP ke HTTPS pada IIS Windows Server

  • Redirect http://domain.com ke https://www.domain.com
  • Redirect http://www.domain.com ke https://www.domain.com
  • Redirect https://domain.com ke https://www.domain.com

  • Edit Site Bindings pada Default Web Site
  • Pilih website yang akan di redirect dari http ke https, double-click URL Rewrite
  • Add Rule(s)… > Blank rule > OK
  • Masukan nama rule: HTTPS
  • Requested URL: Matches the Pattern
  • Using: Regular Expression
  • Pattern: (.*)
  • Ceklis: Ignore case
  • Tab Conditions > Logical grouping: Match Any> Add
  • Condition input: {HTTPS}
  • Check if input string: Matches the Pattern
  • Pattern: off
  • Ceklis: Ignore case > OK
  • Condition input: {HTTP_HOST}
  • Check if input string: Matches the Pattern
  • Pattern: ^domain.com$
  • Ceklis: Ignore case > OK
  • Tab Action > Action type: Redirect
  • Redirect URL: https://www.domain.com/{R:1}
  • Ceklis: Append query string
  • Redirect type: Permanent (301) > Apply
  • Reload domain, dan sudah berhasil ke redirect dari http ke https, now-www ke www, https now-www ke https www

herdiana3389

A system administrator with skills in system administration, virtualization, linux, windows, networking, cloud computing, container, etc.