How to force SSL across all pages

Overview 

There is a way to enable SSL for all current pages with SQL which will cut down on the time spent manually enabling SSL on each page. This article also details the process of how to enforce SSL.

 

Prerequisites

 

Solution

NOTE: The following instructions are for DNN 9.0+. For earlier versions, the path to the SQL console is Host > Advanced Settings > SQL.

1. Log in to your DNN instance. 

2. Go to Persona Bar > Settings > SQL Console.

sqlconsole.jpg

2. Run the following query:

UPDATE Tabs SET IsSecure = 1 WHERE PortalID = #

PortalID can be gathered by running SELECT * FROM PortalAlias and finding the PortalID related to the alias linked with the site.

3. Clear your cache.

4. Go to Persona Bar > Settings > Security.

securitysettings.jpg

5. Enable SSL Enabled.

2020-06-04_1027.png

Note: You do not have to have SSL Enforced enabled as this will not force SSL for your pages.

 

Testing

  1. Select a recently created page from the left page tree.
  2. Click on the Advanced tab.
  3. Click on the More sub-tab.
  4. If successful, Secure Connection should be set to On. The script that was run previously updated this page setting to be turned on.
    forcessl.jpg
  5. Once confirmed, access your site with HTTP and you should be automatically redirected to HTTPS.

 

 

 

 

Comments

2 comments

  • Avatar
    Lewis Hill

    If you configure SSL for a page and go to the Persona Bar > Users > Profile Settings then the profile setting is no longer visible.

    From any page that does not have SSL enabled, I can access the user profile settings.

    The work around is to have a page that does not use SSL to update user profiles.

    We would like to have SSL on all the site pages.

    I hope this is fixed in the next DNN release.

    Note: The support case was 309732 and DNN support was able to recreate the issue on their servers.

    0
    Comment actions Permalink
  • Avatar
    Lewis Hill

    Turning off SSL Enforced resolved the issue... the user profile is HTTP... mixed content.

    0
    Comment actions Permalink

Please sign in to leave a comment.