How to redirect all non-www urls to https://www. in iis?

Member

by mike , in category: SEO , 4 months ago

How to redirect all non-www urls to https://www. in iis?

Facebook Twitter LinkedIn Telegram Whatsapp Pocket

1 answer

Member

by bertha , 4 months ago

@mike 

To redirect all non-www URLs to https://www. in IIS, you can follow the steps below:

  1. Open Internet Information Services (IIS) Manager.
  2. Under the Connections panel, expand the server node and select the website you want to apply the redirect on.
  3. In the Features View, double-click on URL Rewrite.
  4. In the Actions panel, click on "Add Rule(s)" to open the Add Rule(s) dialog.
  5. In the Add Rule(s) dialog, select "Blank Rule" and click OK.
  6. Fill in the following details in the Edit Inbound Rule dialog: Name: Provide a name for the rule. Requested URL: Select "Matches the Pattern" from the drop-down. Using: Select "Regular Expressions" from the drop-down. Pattern: Enter the regular expression ^(.*)$. Ignore case: Checked. Action type: Select "Redirect" from the drop-down. Redirect URL: Enter https://www.{HTTP_HOST}/{R:1}.
  7. Click "Apply" to save the rule.


This rule will redirect all non-www URLs to https://www. URLs within your website in IIS.