To set up a 301 redirect in IIS, follow these steps:
- Open the IIS Manager.
- Select the website you want to apply the redirect to.
- In the middle pane, under the "IIS" section, double-click on "HTTP Redirect".
- Check the box for "Redirect requests to this destination".
- Enter the URL that you want to redirect to in the "Redirect to" field.
- Select "Permanent (301)" from the "Status code" drop-down.
- Click "Apply" in the right-side pane.
- Restart the website for the changes to take effect.
Note: The exact steps may vary slightly depending on the version of IIS you are using.