-
Improvement
-
Resolution: Fixed
-
Minor
-
3.4
-
MOODLE_34_STABLE
-
MOODLE_34_STABLE
-
MDL-57734-master -
Hi there,
we changed our Moodle site to only get access with a forced login ($CFG->forcelogin = true).
A student wondered why our Moodle is not listed in search engines. He did not remember the URL and wanted to find the login page with the search engine.
Then I saw that the meta tag <meta name="robots" content="no-index"> is placed in the header although I did not enter this in the setting additionalhtmlhead or even if I entered <meta name="robots" content="index"> it.
So, I had a look a the code and realised that the meta tag is added hardcoded in this files:
./login/signup.php:$CFG->additionalhtmlhead .= '<meta name="robots" content="noindex" />';
|
./login/index.php:$CFG->additionalhtmlhead .= '<meta name="robots" content="noindex" />';
|
login/index.php line 30
// Try to prevent searching for sites that allow sign-up.
|
if (!isset($CFG->additionalhtmlhead)) {
|
$CFG->additionalhtmlhead = '';
|
}
|
$CFG->additionalhtmlhead .= '<meta name="robots" content="noindex" />';
|
Although we use the forcelogin we would like to have our root URL listed in search engines.
So it would be great if you could add an admin setting for this (e.g. on /admin/settings.php?section=sitepolicies) so that admins can decide if they want their forelogin-Moodle-instance to be indexed by search engines or not.
Thanks and cheers, Kathrin
- is a regression caused by
-
MDL-39503 Avoid telling Google that site allows signup
- Closed