Website security is of utmost importance. One crucial aspect of website security is ensuring that your website uses the secure HTTPS protocol instead of the unencrypted HTTP protocol. Making this switch not only enhances the protection of user data but also improves search engine rankings. In this blog post, we will guide you through the process of redirecting your website from HTTP to HTTPS on a Windows Server.
You are here that means you have already followed the four steps of 5 Steps of SSL installation process including:
Redirecting your website HTTP to HTTPS is the last step of the complete setup of an SSL installation on a Windows server. Follow these steps and redirect your website to a secure HTTPS connection.
Step 1: Download and Install the IIS URL Rewrite module and then start the IIS manager
The IIS URL Rewrite module is a powerful tool that enables you to manage URL redirection. Visit the Microsoft website to download the module installer suitable for your Windows Server version. Once downloaded, run the installer and follow the on-screen instructions to complete the installation.
Step 2: Select the Website to Configure
In the IIS Manager, locate the website you want to redirect from HTTP to HTTPS under the "Sites" section. Right-click on the website and choose "URL Rewrite."
Step 3: Select Add Rule(s)…
Within the URL Rewrite module, click on "Add Rule(s)" on the right-hand side to create a new rule.
Step 4: Choose "Blank Rule"
In the "Add Rule(s)" window, select the "Blank Rule" template given under Inbound rules and click on "OK."
Step 5: Configure the Rule
In the rule configuration window, provide a meaningful name for the rule.
Step 6: Select These Options To Further Configure the Rule
Under the "Match URL" section, set the "Requested URL" to "Matches the Pattern." In the "Using" dropdown, choose "Regular Expressions." In the "Pattern" field, enter "(.*)". Check Ignore case.
Step 7: Define the Conditions- Scroll down in the same window to find all options
Select Match All for Logical grouping. Under the "Conditions" section, click on "Add" to add a new condition. You can enlarge the section if needed.
Step 8: Filling The Details In The Box
In the "Condition Input" field, enter "{HTTPS}" and choose "Matches the Pattern" in the "Check if input string" dropdown. Set the "Pattern" field to "^OFF$". Check Ignore case. Now you can go ahead with the OK button.
Step 9: View Details And Conditions In the List
Your redirection conditions are set, it will appear as shown below.
Step 10: Scroll Down Further To Set the Action
In the "Action" section, set the "Action Type" to "Redirect" and provide the destination URL with the "https://" prefix under Redirect URL. Check the box for "Append Query String" if you want to preserve any query parameters. Set the Redirect type to Permanent (301).
Step 11: Apply the Rule
Click on "Apply" to save the rule configuration.
Step 12: Test the Redirection
Open a web browser and access your website using the HTTP protocol. You should automatically be redirected to the HTTPS version. If any issues arise, you can verify the accuracy of the information by examining the web.config file associated with the website. To do so, follow these steps: Right-click on your site in IIS Manager and select the "Explore" option from the menu.
Step 13: Confirm the web.config existence
Please verify the existence of the web.config file, and proceed to open it using a text editor.
Step 14: Verify the Web Configuration
Ensure that all pages of your website are correctly redirected to HTTPS. Check different sections and verify that the redirection is working as intended.
Your website is ready with HTTPS secure connection. With the addition of an HTTPS secure connection, your website is now equipped with enhanced security and data protection. The implementation of HTTPS ensures that all communication between the website and its users is encrypted, making it significantly more difficult for unauthorized parties to intercept and access sensitive information.