Start here
Editing and styles
Media and content
Tutorials
Site and publishing
Layout and navigation
Forms and services
A Video Tutorial is available for this topic Click Here to view
Use Password Protection to give named users access to selected pages. Organize users into groups, then choose which groups may open each protected page.
For example, a school could have Parents, Students and Teachers groups. An account may belong to more than one group; a page can allow several groups. Decide these permissions before creating accounts.
Open Site Settings > Password Protection. The master password unlocks sensitive information stored in the project; it is separate from the usernames and passwords visitors use on the website. If this panel shows Unlock, unlock the project here before managing accounts or publishing their changes.
Password Protection requires PHP on your web host. Local preview is useful for designing the page, but authentication must be tested on a PHP-enabled server.
Click Edit User Groups, then Add. Enter a group name, such as Teachers, and add an optional note. Sitely creates the default group automatically.
Return to Password Protection and click Edit User Accounts, then Add. Enter a username and password for the person. Add their name and email address if you need them. Open Groups for the account and select each group they belong to. A person can belong to more than one group.
Use the generator beside Password to create a password if you prefer. Additional Information and Private Notes are optional. The Share button opens an email draft with the username and password.
A user can belong to several groups. In this example, selecting Teachers grants that account access to pages whose allowed groups include Teachers. Review membership whenever a person’s role changes.
Select a page and enable Protect With Password in the Page inspector. Open its Edit control and select the groups allowed to view it. Repeat this for every page that needs restricted access; linking to a page from a members’ menu does not set its permissions.
Select the allowed groups deliberately. Check the destination pages as well as the first landing page, so a user cannot follow a link into an area they are not authorized to view.
Sitely creates a User Login Page when you first configure password protection. Style this page to match the site, or add a Login Form to another page. Select the form to configure the destinations shown below.
Under Page Following Login, set a landing page for each group and review For Any Other Access for users without a matching group destination; with several languages, each language can have its own destinations. Choose a public page for Page Following Logout, such as the home page. Group membership still determines access to each destination.
Add an accessible button with the Logout action to the protected area. In Site Settings > Password Protection, use Force User Logout to limit how long a login lasts: After 1 hour, After 8 hours (the default), After 1 day, After 1 week, After 1 month or Never. Publish changes to accounts, groups and protection settings so the server receives the updated configuration. To send only account and group changes, choose a publish location under Update Users and Passwords in Site Settings > Password Protection and click Publish; this uploads the user and group files without republishing the site.
Check both the Logout button and the automatic logout setting on the server. Do not use a successful local preview as evidence that login or logout works.
A public page can contain a login form for logged-out visitors and a different message for logged-in members. The example below shows the public view before login. This is separate from restricting access to the whole page.
After an authorized customer logs in, the page can display a member message in place of the login form. Give each element the appropriate audience in Arrange: Show to All Users, Only Logged In or Only Logged Out, or a user group chosen with Edit. The User Account smart fields can personalize member content, and Login Error Message shows a message you can customize after a failed login.
Select the login form and set its audience visibility in Arrange to logged-out users. Set the member message to logged-in users or to the required group. Keep the alternative versions aligned, because each audience will see only its permitted content.
Pages using password protection or audience visibility are generated as PHP. A static export or local preview cannot run the server-side checks, and may show alternative elements together, as illustrated below. Use a PHP-enabled test location to evaluate the real result.
Click the eye icon in the lower-left corner of the canvas. Choose the signed-out view or a user group to check which elements that audience can see. The choice changes the preview in the editor.
On the published site, test an account with access, one from another group and an incorrect password. Open a protected URL while signed out. Sign out after a successful login and revisit the URL. Publish again after changing permissions.
Select the username field, password field or sign-in button inside Login Form. In Style, apply a compatible Text Input preset to either field or a Button preset to the button. Save Preset stores the selected control’s appearance. The fields and button keep their login behavior.
Please report any shortcoming in this documentation and we’ll fix it as soon as possible!
Updated for Sitely 8
Powerful and refreshingly simple, at home on Mac, finding new freedom on iPad.
Always on. Keeps the site working.
Enables optional features.
Remembers your settings.
Counts visits and page views.
Tailors ads to your browsing.
We and our partners use optional cookies for extra features, saved preferences, visit counts and personalised ads. To change your choices later, use Cookie settings in the footer.
Closing keeps optional cookies off. Privacy policy