Restricting access to site content: Professional subscription plan or higher
After you prepare your website to restrict content, the next step is to configure your taxonomy vocabulary to protect specific website content.
To use vocabulary terms to restrict content to specific user roles:
- Go to Structure > Taxonomy.
- Either create a new vocabulary by clicking Add vocabulary, or click edit vocabulary for the existing taxonomy vocabulary that you want to restrict.
To learn more about vocabularies, see Taxonomy.
- On the vocabulary edit page, select Enable terms to manage content access.
The Allow terms to specify a redirect URL for denied content checkbox appears.
- If you don't want to redirect users to an alternate webpage, do not select this checkbox. Unauthorized users accessing restricted content will receive a standard "access denied" webpage. If you do want to redirect users to a separate webpage, select the Allow terms to specify a redirect URL for denied content checkbox.
You can use an alternate webpage to direct visitors to email an administrator for access to protected content (or to direct users to purchase access using an external e-commerce function). After access is granted, the administrator can change the user's access level.
- Click Save.
The Taxonomy page reloads, and the vocabulary you selected now has the text (access control enabled) appended to its name.
- Click list terms for the selected vocabulary.
- Click the edit link for the term that you want to set access control.
- On the term's edit page, expand the Content access permissions section.
- To restrict content access to your higher-level users only, make sure that your anonymous and authenticated users do not have the following permissions:
- View content with this term
- Edit any content with this term
- Delete any content with this term
- Add this term to content
- Make sure that your higher-level user roles have the appropriate permissions for this term.
- Enter a web URL in the Redirect URL field that contains the page you want your lower-level users to view.
The URL can be a link to an external website, or a relative link to another page on your site. The redirect page can include an "upsell" opportunity, providing the user more information about what they can do to obtain access to restricted content.
- Click Save.