Skip to main content
All CollectionsGeneral
Error in Moodle. This server can only be accessed through...
Error in Moodle. This server can only be accessed through...
Antonio avatar
Written by Antonio
Updated over a year ago

Sometimes when entering Moodle, the error message "Incorrect access detected, this server can only be accessed through the address "http://dominio.com", sorry. Please notify the server administrator" appears, and then it redirects to Moodle.

This error appears because in the Moodle configuration file, the value "$CFG->wwwroot" must be specified, which indicates the Moodle access URL. This path can be "http://dominio.com" or "http://www.dominio.com", and the error will appear when using the other form to enter the page.

To avoid this from happening, you can follow these steps:

  • Check in the config.php file of Moodle if "$CFG->wwwroot" is set with or without www.

  • In the Plesk panel, enter the domain where Moodle is located, then go to Websites and Domains and click on "Configure Hosting".

  • In that window, in the preferred domain section, there is a dropdown with options with www, without www, and none. Select the one that matches the configuration file.

  • Check that when entering the page with or without www, it enters without showing the error.

Did this answer your question?