Nix that pesky “Incorrect access detected, this server may be accessed only through “” address, sorry”

--- Advertisement ---

Post Pages - Post Inline - WIRIS


Does the above look familiar? It’s caused because a Moodle install is set to recognize only one specific URL as it’s direct URL. While the above is only a minor inconvenience (you are sent to the right page in a few seconds by default) you can eliminate this page by changing only one character in your Moodle code. I found the solution at in this forum, the solution was posted by Daniel Garcia Sanchez.

Note that this requires you to edit your lib/setuplib.php file, you will need access to edit these files: The code on my Moodle (2.5.1) was line 805 (give or take). Changing the 3 to a 0 eliminated that screen so that users weren’t confused when visiting the site.




3 Responses

  1. useless,

    best way is to edit confug.php and type correct adress.

    or if u want only to disable message use way described above.


  2. Far from useless. Some of us have both external and internal site names, or server naming schemes which are already fixed for automatic NTLM authentication via kerberos and CNAME records in DNS for the actual application addresses. In which case, moodle doesn’t actually offer me a way to make it work since I require, actually REQUIRE the moodle to respond to more than one URL. Since moodle doesn’t make this possible, this far from useless tip is very handy.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

The Latest

The eLearn Podcast

--- Advertisement ---

Post Pages - Sidebar 4 - CourseMerchant

--- Advertisement ---

Post Pages - Sidebar 7 - Titus Learning

--- Advertisement ---

Post Pages - Sidebar 5 - Edwiser (RemUI)

Subscribe to our newsletter

Education technology has the power to change lives. 

To get the latest news, information and resources about online learning from around the world by clicking on the button below.