Restricting Pages to Logged-in Visitors

With Scrivito, you can make pages available to just a part of your audience. For this, you can restrict the visibility of pages, meaning that they are no longer publicly accessible. Instead, only logged-in visitors are able to open such pages. This makes it possible to, for example:

  • Offer access to special content as an incentive to logging in.
  • Require visitors to log in to be able use special services.

Next to being on a business plan, a prerequisite for letting visitors log in to a Scrivito-based website is having set up an identity provider in the CMS’s dashboard. This can be easily accomplished by an administrator. Also, the website application must have been prepared to enable visitors to log in. Scrivito supports authenticating via OpenID Connect, i.e. via an account at any provider offering this method, e.g. Microsoft or Google.

Setting page visibility

In order to require a visitor to log in to access a specific page, open its properties, locate the “Visibility” switch, and set it to “Restricted”. 

Binary content like images and PDF documents can be restricted via their properties view in the Content Browser.

As with all other settings, changes to the visibility of a page or a binary become effective only after the working copy has been published.

Moving a restricted page to a website area made up of unrestricted pages or vice versa causes Scrivito to ask you whether to drop or, respectively, activate the restriction.

What it effects

After restricting a page and publishing the working copy, only logged-in visitors will be able to open this page. The restriction does not apply to editors logged into Scrivito’s editing interface.

Visitors not logged in can neither access a restricted page directly, i.e. by entering its URL in the browser’s address line, nor does the page show up on search result pages. Also, it won’t be present as an item in link lists and automatically generated navigations such as main menus. The page will simply appear to be nonexistent, even towards bots and crawlers. This also means that regular links pointing to a restricted page (e.g. from within a text widget) will cause a “Page not found” error to occur when clicked.

To determine whether links are pointing to a page you intend to restrict, check the “Linked by” tab in its properties view.