- Update the
config.php file in the Moodle root directory to include the following lines:
$CFG->wwwroot = 'https://example.com';
$CFG->httpswwwroot = 'https://example.com';
$CFG->httpsadmin = true;
- Replace
example.com with your actual domain name.
- You may also need to update the
httpswwwroot and httpsadmin parameters if you use a different domain name for your Moodle administration area.
- Replace all occurrences of
http:// with https:// in your Moodle templates, CSS files, and other static files.
- You can manually replace the
http:// prefix or use a search and replace tool to ensure all links utilize HTTPS.