locked
IIS 8.4 How to redirect http://www.example.com to https://www.example.com with code 301 RRS feed

  • Question

  • I trying make redirect http://www.example.com to https://www.example.com with  code 301 but i get code status 302 and then i redirect status code 301. But i need  only code with status 301 without 302
    Monday, May 21, 2018 7:50 AM

Answers

All replies

  • Hi,

    Thanks for your question.

    1)You could navigate to IIS console > IIS server > HTTP Redirect > Right click “open feature” > Change Status code to 301 as the following figure.

     

    2)You could check your Web.config file and make sure whether you define other URL Rewrite Rules that change status code.

    Please refer to the following link for more information,  

    https://stackoverflow.com/questions/40433759/web-config-redirect-to-https-with-301-status-code?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa

    Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.

    3) It is recommended to clean the browser cache and test a redirect with 301. Due to if you change the status code, there could be a long-term effective.

    Reference link:

    HTTP Redirects <httpRedirect>

    https://docs.microsoft.com/en-us/iis/configuration/system.webserver/httpredirect/

    Hope this helps. I look forward hearing your good news. If you have any questions, please feel free to let me know.

    Have a nice day!

    Best regards,

    Michael


    Please remember to mark the replies as an answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Tuesday, May 22, 2018 7:25 AM
  • Hi,

    Just checking in to see if the information provided was helpful. Please let us know if you would like further assistance.

    Best Regards,

    Michael


    Please remember to mark the replies as an answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Thursday, May 24, 2018 4:26 PM
  • Hi,
    Could the above reply be of help? If yes, you may mark it as answer, if not, feel free to feed back
    Best Regards,
    Michael


    Please remember to mark the replies as an answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Monday, May 28, 2018 1:20 PM