2019-10-31 11:06:41 -04:00
---
type: reference, howto
2020-05-10 20:09:29 -04:00
stage: Release
2020-12-01 10:09:28 -05:00
group: Release
2020-11-26 01:09:20 -05:00
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
2019-10-31 11:06:41 -04:00
---
2021-06-10 08:10:09 -04:00
# GitLab Pages access control **(FREE)**
2019-10-31 11:06:41 -04:00
2020-05-21 23:08:28 -04:00
> - [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/33422) in GitLab 11.5.
2019-10-31 11:06:41 -04:00
> - Available on GitLab.com in GitLab 12.4.
2020-09-06 23:08:10 -04:00
You can enable Pages access control on your project
if your administrator has [enabled the access control feature ](../../../administration/pages/index.md#access-control )
on your GitLab instance. When enabled, only
2019-10-31 11:06:41 -04:00
[members of your project ](../../permissions.md#project-members-permissions )
(at least Guest) can access your website:
2020-04-23 23:09:23 -04:00
< i class = "fa fa-youtube-play youtube" aria-hidden = "true" > < / i >
For a demonstration, see [Pages access controls ](https://www.youtube.com/watch?v=tSPAr5mQYc8 ).
2019-12-16 10:07:39 -05:00
1. Navigate to your project's **Settings > General** and expand **Visibility, project features, permissions** .
2019-10-31 11:06:41 -04:00
2020-10-15 23:08:29 -04:00
1. 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 ](../../../administration/pages/index.md#access-control ).
2019-10-31 11:06:41 -04:00
1. The Pages access control dropdown allows you to set who can view pages hosted
with GitLab Pages, depending on your project's visibility:
- If your project is private:
2020-12-17 16:09:57 -05:00
- **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.
2019-10-31 11:06:41 -04:00
- If your project is internal:
2020-12-17 16:09:57 -05:00
- **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.
2019-10-31 11:06:41 -04:00
- If your project is public:
2020-12-17 16:09:57 -05:00
- **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.
2019-10-31 11:06:41 -04:00
2021-02-04 13:09:22 -05:00
1. Click **Save changes** . Note that 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.
2019-10-31 11:06:41 -04:00
The next time someone tries to access your website and the access control is
2020-12-17 16:09:57 -05:00
enabled, they're presented with a page to sign into GitLab and verify they
2019-10-31 11:06:41 -04:00
can access the website.
## Terminating a Pages session
2020-10-05 14:08:51 -04:00
To sign out of your GitLab Pages website, revoke the application access token
for GitLab Pages:
2019-10-31 11:06:41 -04:00
2020-10-05 14:08:51 -04:00
1. In the top menu, select your profile, and then select **Settings** .
1. In the left sidebar, select **Applications** .
1. Scroll to the **Authorized applications** section, find the **GitLab Pages**
entry, and select its **Revoke** button.