Please check gitlab-tutorial

Skip to content

GitLab Pages access control

DETAILS: Tier: Free, Premium, Ultimate Offering: GitLab.com, 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.

  1. On the left sidebar, select Search or go to and find your project.

  2. Select Settings > General.

  3. Expand Visibility, project features, permissions.

  4. 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.

  5. 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.
  6. 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.

Terminating a Pages session

To sign out of your GitLab Pages website, revoke the application access token for GitLab Pages:

  1. On the left sidebar, select your avatar.
  2. Select Edit profile.
  3. Select Applications.
  4. In the Authorized applications section, find the GitLab Pages entry, and select Revoke.