GitLab Pages access control
- Tier: Free, Premium, Ultimate
- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
You can enable Pages access control on your project if your administrator has enabled the access control feature on your GitLab instance. When enabled, only authenticated members of your project (at least Guest) can access your website, by default:
For a demonstration, see Pages access controls.
On the left sidebar, select Search or go to and find your project.
Select Settings > General.
Expand Visibility, project features, permissions.
Toggle the Pages button to enable the access control. If you don’t see the toggle button, that means it isn’t enabled. Ask your administrator to enable it.
The Pages access control dropdown list allows you to set who can view pages hosted with GitLab Pages, depending on your project’s visibility:
- If your project is private:
- Only project members: Only project members are able to browse the website.
- Everyone: Everyone, both logged into and logged out of GitLab, is able to browse the website, no matter their project membership.
- If your project is internal:
- Only project members: Only project members are able to browse the website.
- Everyone with access: Everyone logged into GitLab is able to browse the website, no matter their project membership.
- Everyone: Everyone, both logged into and logged out of GitLab, is able to browse the website, no matter their project membership.
- If your project is public:
- Only project members: Only project members are able to browse the website.
- Everyone with access: Everyone, both logged into and logged out of GitLab, is able to browse the website, no matter their project membership.
- If your project is private:
Select Save changes. Your changes may not take effect immediately. GitLab Pages uses a caching mechanism for efficiency. Your changes may not take effect until that cache is invalidated, which usually takes less than a minute.
The next time someone tries to access your website and the access control is enabled, they’re presented with a page to sign in to GitLab and verify they can access the website.
Restrict Pages access to project members for the group and its subgroups
You can configure a setting for the group to restrict Pages access to only project members. When enabled, all projects in the group and its subgroups become visible only to members.
Prerequisites
- Public access to Pages must not be disabled at the instance level.
- You must have the Owner role for the group.
To do this:
- On the left sidebar, select Search or go to and find your group.
- Select Settings > General.
- Expand Permissions and group features.
- Under Pages access control, select Restrict access to only project members on all group projects.
- Select Save changes.
GitLab Pages uses a cache for efficiency. Changes to access settings typically take effect within one minute when the cache updates.
Terminating a Pages session
To sign out of your GitLab Pages website, revoke the application access token for GitLab Pages:
- On the left sidebar, select your avatar.
- Select Edit profile.
- Select Applications.
- In the Authorized applications section, find the GitLab Pages entry, and select Revoke.
Docs
Edit this page to fix an error or add an improvement in a merge request.
Create an issue to suggest an improvement to this page.
Product
Create an issue if there's something you don't like about this feature.
Propose functionality by submitting a feature request.
Feature availability and product trials
View pricing to see all GitLab tiers and features, or to upgrade.
Try GitLab for free with access to all features for 30 days.
Get help
If you didn't find what you were looking for, search the docs.
If you want help with something specific and could use community support, post on the GitLab forum.
For problems setting up or using this feature (depending on your GitLab subscription).
Request support