Why guest access and public profiles need a deliberate setting in Moodle
A Moodle site reachable from the internet can expose course pages, the site home, guest access and user profiles to anonymous visitors unless someone decides, on purpose, what those visitors may see. The default is not a safe answer to that question, and the answer differs between an existing site and a new install. This topic covers the controls that set it: the guest role, the site home role and its permissions, open user profiles, search engine access to course and profile pages, and the forced login defaults that Moodle 5.2 applies to new installs. Teams need this work when a public website, a self-hosted course catalog or a recruitment or outreach page sits on the same domain as private learning content, when a site was upgraded from an older version and nobody reviewed its guest settings, or when a security review asks who can see what before signing in.
The first thing to confirm is which version you are running and how it was installed. The Moodle 5.2 release notes state that new-install defaults changed, including forcing login and enabling email login, so a fresh 5.2 site and a site upgraded from an earlier release can behave differently even when the admin settings look similar. Record the current values of the login-related settings, the guest login option, the role assigned to the site home and the profile visibility options before changing anything, then compare them with what the release notes describe for your version. Treat each of these as a value to verify on your own site, not something to assume from the documentation.
Work through the settings in a fixed order: confirm whether the site requires login for every page, check which capabilities the guest and authenticated user roles hold, review whether the site home is a public page, and then test an anonymous browser session against course pages, profiles and search results. Search engine indexing depends on what anonymous visitors can reach, so the same test answers the indexing question. Plan for a retest after every upgrade and after any plugin that adds public pages, because defaults and role permissions can change between releases.
How an anonymous request reaches course and profile content
The request starts at the web server document root, then reaches Moodle's entry point, where the Force login setting decides whether the visitor is sent to the login page. If forced login is off, the request falls to the guest role and the site home role, which control the front page. From there, course visibility and guest access enrolment decide which courses open, and the profile capabilities of the guest and front page roles decide which user profiles show. Search engine crawlers follow the same path, so check the search engine access setting and each role's capabilities together.
Anonymous request path with the settings that control each step.
Guest, site home and profile settings and when each fits
This table compares the Moodle settings that decide what anonymous visitors and search engines can see, with the usual reason to change each one. Read each row as a question: what is exposed if the setting stays open, and what do learners or staff lose if it is closed. Most public-facing sites should start from forced login and tighten only the paths that a real audience needs.
| Setting | What it exposes | Usual reason to change it | Trade-off for learners and staff |
|---|---|---|---|
| Forced login | Course pages, content and activity names are hidden from anyone not signed in | Keep private course material and internal catalogs away from the open web | Visitors must sign in before seeing anything, so public course previews need another route |
| Guest access (per course) | Enrolled content in a course that allows guest entry without an account | Offer a short open course or sample lesson to outside visitors | Guest sessions have limited profile and activity data, and any guest content should be reviewed before enabling |
| Guest role | Capabilities granted to the guest user, which apply to anyone browsing without an account | Reduce what unauthenticated visitors can view or do, after reviewing the role's permissions | Changing it affects every guest-accessible course, so test each course after the change |
| Site home role for not-logged-in users | What the front page shows to anonymous visitors | Show a marketing or information page without exposing course lists | Staff and learners may not find login links or course listings if the home page is too restricted |
| Open user profiles | Profile details, course lists and activity for users visible to other signed-in or anonymous viewers | Limit profile visibility to classmates, staff or the user alone | Learners may find it harder to contact peers or teachers, and staff may lose directory visibility |
| Search engine access | Whether public pages, course summaries and profiles can be indexed by external search engines | Keep internal learning content out of search results and reduce scraping | Public discoverability drops for any content you intend to promote, so confirm which pages should stay indexable |
| Email login and self-registration (5.2 defaults) | Whether a sign-in can be attempted with an email address and whether new accounts can be created | Review new-install defaults and confirm forced login and email login match your policy | Changing login methods affects users who rely on them, so communicate before switching and test with a sample account |
How to set the lockdown sequence on a live site
This sequence takes a live Moodle site from open public access to a state where anonymous visitors see only what you intend to publish. Each step has a check, so the order itself doubles as a record of what changed and why.
Take a baseline before changing anything
Run the security overview report in Site administration and save or screenshot its findings, then open the site in a private browser window while logged out. Note which course pages, user profiles, forum posts and the front page are readable without signing in. Record the Moodle version and the current guest access setting so you can compare later. Done means you have a dated list of what anonymous visitors can see today and a copy of the report findings related to guest and public access.
Enable forced login
In Site administration, set forced login so that visitors must sign in before they can view any part of the site, then confirm the setting saved. Anyone who needs public content will have to be moved to a deliberate publishing route later, so tell course owners before this change. Because Moodle 5.2 changed new-install defaults to force login and enable email login, check whether your existing site has the setting on or off and whether that matches your intent. Done means a logged-out browser session is redirected to the login page for every course and profile URL you tested in the baseline.
Disable guest access where it is not needed
Review the guest login setting and the guest role in the authentication and roles areas, and turn off guest access on any course that does not need it. If a course must stay open to guests, record the owner and the business reason next to it. Confirm that the guest role does not carry capabilities you would not grant to an anonymous visitor. Done means a list of courses with guest access enabled matches a documented exception list, and a logged-out test of a course not on that list is redirected to login.
Review the site home and frontpage role
Check the frontpage role assignments and the capabilities granted to the site home context, since these determine what someone sees on the front page without enrolment. Remove any capability that exposes content you did not intend to publish, and keep only the front page elements that should be public. Confirm with the site administrators who manage the front page settings. Done means the frontpage role shows only the permissions you approved, and a logged-out visit to the home page shows only the content on your approved list.
Restrict profile visibility
Review the user profile settings, including who can view profiles and which fields appear, and limit visibility to signed-in users where possible. Check the course participant and forum post links that lead to profiles, since a public profile can be reached from them. Verify the choice against your privacy notice and any applicable policy rules. Done means a logged-out request for a known user profile URL is refused or redirected, and a signed-in test account shows only the fields you chose to expose.
Check how search engines reach the site
Confirm the search engine access setting and whether your site allows indexing of public pages, then compare it with the decision you made about public content. If the site should not be indexed, make sure the robots controls and the site setting agree and that the login page does not expose course titles. Ask your web team to confirm what their server returns for crawler requests. Done means the setting matches your documented decision and a search of your domain returns only the pages you intended to be discoverable.
Retest as an anonymous visitor
Repeat the baseline test in a fresh private browser session and an unauthenticated command line request to the same URLs you recorded at the start. Compare each result with the expected state and record any difference, including cached pages or links that still work. Re-run the security overview report and compare its findings with the baseline. Done means every URL in your test list returns the expected result, the report shows no new findings in this area, and you have a dated record for your change file.
Which exposures matter most on a public Moodle site
A public Moodle site exposes content through several separate doors: the guest role, the site home, public profiles, and self-registration. Each one can be closed on its own, and each can quietly reopen after an upgrade or a plugin install, so the checks below should be run as a set rather than once.
Course content read by strangers
Courses can be viewable without an account when the guest access setting is enabled on a course or category, or when a course is open to anyone who reaches its URL. Course descriptions, syllabi and uploaded files may then be readable by people who were never enrolled. Check each course's enrolment methods for guest access, and review the course visibility settings on categories that were created for internal use.
Profile details exposed to crawlers
Open user profiles can show names, descriptions, forum posts and course lists to visitors who are not logged in, and search engines can index pages they can reach. Profile visibility depends on the site-level settings for who can view profiles and on whether guest users can see them. Review what a logged-out browser sees on a sample student profile, and confirm the search engine access setting matches your policy.
Guest access to activities
The guest role can be granted capabilities inside activities, which lets an anonymous visitor open quizzes, forums or resources if a course allows it. Guest access is a separate switch from guest role permissions, so both need to be reviewed. Walk through each activity type your courses use while signed out, and confirm the guest role has no capabilities beyond viewing public pages.
Enrolment and self-registration bypasses
Email self-registration and some enrolment methods can let new accounts reach course content without the review step the site owner expects. An enrolment method that is enabled on a single course can override a lockdown applied at site level. Inventory the authentication plugins and enrolment methods that are switched on, including any external database or web service paths, and confirm each one is intended.
Core auth pluginsSettings reopened by upgrades
Moodle 5.2 changed defaults for new installs, including forcing login and enabling email login, so a site that was built on older defaults or restored from a backup may behave differently from what the team remembers. Upgrades and new plugin installs can also add roles, change capabilities or reset settings. Record the expected values for guest, home and profile settings, and re-check them after each upgrade.
Moodle 5.2 release notesWhat changes for new 5.2 installs and what existing sites must check
Moodle 5.2 changed the defaults that apply when a site is installed fresh, and two of those changes bear directly on anonymous access: the install now forces login, and email login is enabled. Forcing login means visitors are sent to sign in before they see course content, which closes off much of what a guest could previously browse. Email login lets users sign in with their email address as well as a username. The release notes for Moodle 5.2 are the authoritative description of these defaults and of their exact behaviour, so confirm the wording there before you rely on it in a review.
The defaults only apply to new installs. An existing site keeps the values it already holds, including any upgrade from an earlier release, so a site that was set up years ago may still allow guest access, open profiles or unforced browsing. After upgrading, export or record the current values of the forced login and guest-related settings in the administration pages, then compare each one with the 5.2 defaults described in the release notes. Where they differ, decide whether the difference is deliberate and document the reason. Do not assume the upgrade changed anything on your site.
Treat this comparison as a one-time baseline check that you repeat after each major upgrade and after any change to the site's authentication setup. Ask whoever runs your Moodle site to confirm the current forced login setting, the guest access setting and the email login setting, and to record who approved each value. If your site is configured through config.php or managed by a configuration tool, check whether the setting is locked there, because a value fixed in configuration will not change through the admin pages during the comparison.
Operational checks to keep the lockdown in place
A guest and public-profile lockdown drifts unless someone checks it. The cards below cover the recurring checks that catch drift after upgrades, plugin installs and theme changes, and they link back to the settings a reviewer should confirm each time.
Re-run the security report
Run the security overview report after every core upgrade, minor release and plugin install. Look first at findings tied to guest access, the guest login setting and the site home context, because a new plugin or upgrade can reset a setting you changed by hand. Record each finding as fixed, accepted with a reason, or open, so the next run shows what changed rather than repeating the full list.
Moodle 5.2 notesRecord the expected settings
Write down the value you expect for each control: guest login, forced login, open user profiles, search engine access and the roles assigned to the site home context. Store the record in version control or your configuration documentation. Without a baseline, a reviewer cannot tell an intentional change from an accidental one, and an upgrade that changes defaults will go unnoticed.
Test as an anonymous visitor
After each change, open the site in a private browser window that is not signed in. Try the home page, course pages, user profile URLs, the course search page and any public calendar or RSS links. Confirm that each one redirects to login or returns the expected empty result. A logged-in administrator sees far more than an anonymous visitor, so admin testing alone proves little.
Review site home role assignments
Check who holds roles in the site home context, which is where role assignments apply to the whole site. Confirm that no role grants read access to content for users who are not enrolled, and that the authenticated user role has only the capabilities you intend. Export the assignments on each review so you can compare them with the last review.
Check third-party themes and plugins
Before enabling a theme or plugin, look for pages it adds that are reachable without login, including custom landing pages, public widgets and API endpoints. Compare the site as an anonymous visitor before and after installation. Treat a plugin that adds public pages as a change to the lockdown, and record it in the same baseline as the core settings.
Questions buyers ask about locking down Moodle guest access
How much effort does locking down guest access and public profiles take?
The effort depends on how many settings are in play and how the site is used today. The core work covers the guest login setting, the role assigned to guests and to the site home, whether user profiles are open to logged-in users or visitors, what search engines can index, and the forced login defaults. A site that has been running for years with several custom roles and public course pages needs more review than a fresh install. Ask any provider to break the quote into the settings reviewed, the roles audited, the test passes and the change window, so you can see what drives the figure.
Can our internal team lock down guest access on its own?
Yes, many teams can make the changes in the administration menu if they have a site administrator account and time to read the settings carefully. The risk lies in side effects: a public course that depends on guest access, a role that quietly grants view rights to anonymous users, or a profile setting that exposes data after an upgrade. Teams without Moodle administration experience usually benefit from a second review. Confirm who in your team holds site administrator rights before you start, because those accounts are the ones that can reverse the change.
What access and preparation does the work need from our side?
The work needs an administrator account with the rights to change site, role and authentication settings, read access to the server and the Moodle version in use, and a list of courses that are meant to be public. A dedicated test account with a normal student role, and a second test account that is not logged in, let the reviewer check what each audience sees. Plan a change window because some settings affect every visitor at once. Ask whether a staging copy of the site is available so changes can be checked before production.
How does locking down guest access interact with SSO and course enrolment?
Forcing login and tightening guest access usually works well with single sign-on, because visitors are sent to the identity provider before they reach any content. Check that the login page, the SSO button and any self-registration path behave as expected after the change, since a redirect loop or a hidden login link can lock out real users. Public courses that rely on guest enrolment need a deliberate decision: either keep them open with a clear purpose or move them to a login-required design. Test each enrolment method separately, including manual enrolment and any sync from another system.
What goes wrong when guest access is changed without a test plan?
The most common problems are a course that stops loading for an audience that still needs it, an email link that now asks for a login, and a search engine that keeps showing old cached pages. Some sites also discover that a custom theme or block was built on the assumption that visitors could see the home page. Record the current settings before any change so the previous state can be restored. A written test plan that covers a guest visit, a logged-in student and an administrator usually catches these problems before users do.
How do we confirm that guest access and public profiles are locked down?
Confirm the result by testing as each audience, not only by reading the settings. Open the site in a private browser window with no session, check whether course pages and user profiles load, and try the search engine test by searching for a known public page after the next crawl. Re-run the Moodle security overview report and compare its findings with the earlier run. Keep a dated record of the settings, the test results and who approved them, because auditors and internal reviewers will ask for that evidence.
Which Moodle version changes the defaults for new installs?
Moodle 5.2 changed the defaults for new installations, including forcing login and enabling email login. Sites that were installed before that release keep their existing settings unless someone changes them, so an older site may still allow visitors to see more than a new one. Check the release notes for the version you run, then compare the live settings with the defaults described there. Confirm the exact behaviour in your own environment, because upgrades can carry older settings forward.
Should we keep public courses open to guests at all?
That is a policy decision rather than a technical one, and it depends on who the content is for. Public course catalogues, open learning resources and marketing material may need anonymous access, while internal training, assessments and staff content rarely do. Decide by audience and data sensitivity, then configure each course deliberately. Any open course should be listed in your review record with an owner and a reason, so it can be checked again at the next security review.
Limits to confirm in your own environment
The guest and public access settings differ by Moodle version, theme and installed plugins, so the defaults on your site may not match the ones described on this page. The cards below list what to confirm on a staging copy of your own installation before you change production. Each check protects the same outcome: anonymous visitors and search engines see only what you intend to publish.
Exact setting names and defaults
Confirm the precise labels, locations and default values for guest access, site home role, open user profiles and forced login in the version you run. Record the value on your current site, then compare it with the new-install defaults. A new install and an upgraded site can differ, so check each one separately rather than assuming the 5.2 defaults apply to a site upgraded from an earlier release.
5.2 release notesSearch engine indexing for your theme
Confirm whether your theme, and any header or footer content it renders, lets search engines reach course and profile pages. Test with a logged-out browser and a crawler simulation on staging. Forced login can hide pages from search engines, but a theme or plugin can still expose content through its own public routes, so verify what is actually served to an anonymous request.
Whether public courses are needed
Ask marketing and academic owners whether any course must be visible to people without an account, such as a course catalogue or open enrolment page. Each public course widens what guests can see, including activity names and descriptions. Keep the list short and written down, and review it when courses are archived or renamed.
Plugin-provided public pages
Inventory every installed plugin that adds a page, block, feed or endpoint reachable without signing in. Blocks placed on the site home page, report pages and public calendar or feed URLs are common sources. Review each one on the security report and in a logged-out session, because core settings do not always cover plugin output.
Upgrade path from your current version
Confirm the route from your running release to the one you plan to use. Moodle 4.5 is an LTS release with security support until 4 October 2027, and Moodle 5.1 has security support until 19 April 2027. Moodle 5.2 has security support until 4 October 2027 and Moodle 5.3 is the next LTS. Check PHP and database requirements and plugin compatibility before you move, since access settings may change during the upgrade.
Moodle releases pageHow DeployOpen scopes and delivers a Moodle access lockdown
DeployOpen plans and delivers guest and public access changes on self-hosted Moodle inside your own infrastructure, starting from a written record of what anonymous visitors and search engines can currently reach. The work is fixed-scope, with the settings, roles and evidence agreed in writing before any change is made to your site.
How we scope
- Review the current guest role, site home role, open profile settings and search engine access on your live site
- Record which pages, course listings and profiles anonymous visitors can see today
- Agree in writing which forced login and email login defaults your version needs to keep or change
How we build
- Apply role and permission changes in a staging copy cloned from production before touching the live site
- Test sign-out sessions, public URLs and search indexing from an unauthenticated browser after each change
- Confirm that course enrolment, SSO sign-in and existing guest-facing content still behave as intended
How we hand over
- Deliver a written record of each setting changed, its previous value and the reason for the change
- Provide a re-test checklist your administrators can run after upgrades or plugin installs
- Document which controls belong to your identity provider and which remain in Moodle administration
How we support
- Engagements are fixed-scope, with deliverables and timelines agreed in writing before work starts
- Ongoing support, upgrades and continuous testing are available as a retainer
- Confirm with your team which Moodle version and retainer terms apply before work begins

