Disable HTTP and Allow only HTTPSRSS

3 replies

Last post Feb 14, 2020 07:44 AM by Jalpa Panchal

‹ Previous Thread|Next Thread ›
  • Disable HTTP and Allow only HTTPS

    Feb 13, 2020 02:45 PM|vk1097|LINK

    Hi Team,

    I've an issue with url redirection. Currently i have an app devleoped in Python and used IIS to deploy it. Portal works fine with http binding. Network team has configured the domain in such a way that if user enters http://xxx.yyy.net, it will redirect the request host to https.

    A week ago, we got SSL certificate for our domain to make it secure. I recieved pfx certificate from them. Using Server Certificates option, i imported the certificate and binded my website with it.

    Now the issue, website is running only when i have both http and https bindings in it. If i remove http bindings, website stops.

    So i kept both http and https in my binding and to find is the request host url is http or https, i written a log in my python code to track it.

    I found it was only http://xxx.yyy.net and not https://xxx.yyy.net.

    So is there any workaround to make it https and block http. I dont want the website to work on http.

  • Re: Disable HTTP and Allow only HTTPS

    Feb 13, 2020 03:24 PM|lextm|LINK


    If i remove http bindings, website stops.

    Stop in which way? Show it clearly.

    You should not remove HTTP binding either, as people now simply use URL Rewrite module to redirect from HTTP to HTTPS.

    Lex Li
    This posting is provided "AS IS" with no warranties, and confers no rights.
  • Re: Disable HTTP and Allow only HTTPS

    Feb 13, 2020 05:58 PM|vk1097|LINK

    Thanks lextm for your reply.

    I have 2 bindings one with http(unassigned):80 and another with https(unassigned):443. When i run my website with any of the url, its working fine. But when i remove http binding and try to run my website, the page doesn’t getting loaded.

    Since I’m using some python libraries for single sign on implantation, i need request url to be https and not http.

    If i have both http and https binding, my python library is getting http request when page loaded.
    So i thought of allowing only https and not http.
  • Re: Disable HTTP and Allow only HTTPS

    Feb 14, 2020 07:44 AM|Jalpa Panchal|LINK


    You cant remove the HTTP binding from the site as lex li suggested. you could use IIS URL rewrite module to redirect the HTTP request to https.

    below is the rule:

     <rule name="HTTPS force" enabled="true" stopProcessing="true">
     <match url="(.*)" />
     <add input="{HTTPS}" pattern="^OFF$" />
     <action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Permanent" />

    Note:  make sure you installed the URL rewrite Extention. if not you could download it from below link:


    you could refer below link on how to configure pfx certificate in iis:



    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue.
    If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
‹ Previous Thread|Next Thread ›