Forcing Moodle 2.3 to work over SSL Updated on August 16, 2021 by InMotion Hosting Contributor 0 Minutes, 56 Seconds to Read When managing a Moodle site, there are reasons to make the entire Moodle site work on an https:// connection. This will make all data transmitted over the site to be encrypted on an SSL connection. To achieve this, the Moodle config.php file will need to be edited and the .htaccess will need to have a redirect set up to force the https:// to load. The following tutorial will explain how to force Moodle 2.3 to work over an SSL connection. Forcing SSL on https for Moodle Log into cPanel Navigate to the config.php file in the File manager. Look for the line 17 (on default config files) that shows: $CFG->wwwroot = 'https://example.com'; Change the https:// to https:// like the following: $CFG->wwwroot = 'https://example.com'; Next, Set up a redirect in your .htaccess file. Place the following code to force the https:// redirect. RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.example.com/$1 [R,L] Save the .htaccess file. This concludes the article on Forcing Moodle 2.3 to work over SSL. For more information on this Education course please visit Moodle site security and server settings Share this Article InMotion Hosting Contributor Content Writer InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals! More Articles by InMotion Hosting Related Articles How to install Moodle using Fantastico Installing Moodle with Softaculous How to Add Content Security Policy in Moodle With the Local CSP Plugin Inserting an image slider in Moodle Changing the Moodle admin password through PhpMyAdmin Fix “uploaded file may exceed the post_max_size directive in php.ini” How to Add the Quiz Module in Moodle Adding the File Resource Module to Moodle Courses Integrate Jitsi with Moodle Courses How to Install a Plugin in Moodle