SSL Redirect for SSRS 2019

Bob Singer 1 Reputation point
2021-10-21T20:55:57.557+00:00

I'm working with SSRS 2019. I think that I've determined that SSRS doesn't natively support a way to redirect HTTP to HTTPS. The workaround seems to be to remove port 80 from Report Server Configuration Manager and install IIS to handle port 80 traffic with the URL Rewrite module. Please correct me if there's a better way. I'd prefer not to have IIS installed if there's a cleaner way to accomplish a redirect for SSRS.

I'm having a lot of trouble writing a redirect rule. I'd like to both redirect any incoming HTTP requests to HTTPS (which would be handled SSRS) and redirect any traffic to the default site to /Reports. Essentially, I've been trying to combine these two code samples without much success:

<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="HTTP to HTTPS redirect" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTPS}" pattern="off" />
</conditions>
<action type="Redirect" url="http://{HTTP_HOST}{REQUEST_URI}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Redirect to /Reports" stopProcessing="true">
<match url="^$" />
<action type="Redirect" url="/Reports" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>

Any and all help is appreciated. Thanx!

Internet Information Services
SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
2,807 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Joshua Perry 10 Reputation points
    2023-10-05T23:19:15.6466667+00:00

    Do it the easy way and just change one value in your rsreportserver.config file.

    <Add Key="SecureConnectionLevel" Value="3"/>

    This will force TLS and automatically redirect HTTP to HTTPS.

    2 people found this answer helpful.

  2. Bruce Zhang-MSFT 3,736 Reputation points
    2021-10-22T01:53:03.773+00:00

    Hi @Bob Singer ,

    There are some mistakes in the HTTP to HTTPS redirect rule. I do some change and you can use it.

    <rule name="http to https" enabled="false">  
                        <match url="(.*)" />  
                        <conditions>  
                            <add input="{HTTPS}" pattern="^Off$" />  
                        </conditions>  
                        <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" />  
                    </rule>  
    

    Another rule Redirect to /Reports, if it only redirect traffic to main page to /reports, such as http://abc.com to http://abc.com/reports, I think it is no problem and test it work well.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Best regards,
    Bruce Zhang