- Access
- Security
Protect a static site with a password or invitations
Passwords, private access, share links and e-mail invitations for client reviews, internal docs or a page that is not announced yet.
· 2 min read
Not every page should be public. A design to show a client, a team’s internal docs or a page waiting for launch day: static sites usually fall short here, since either everyone sees them or you have to put a server in front. On Taslak, access is handled in the layer in front of your site; you do not change your site’s code.
Three levels
On the site’s Access page in the panel there are three choices:
- Public: anyone with the address can open it.
- Password: visitors type a password you choose. Changing it ends earlier sessions.
- Private: only people with a share link, people you invite and your team can open it.
The choice applies to the live site and every version address. Protected pages are kept out of search engines.
Share links
The easiest way to open a private site to a group is a share link. Make one per person or group, so you can revoke just that one. A link can have an expiry and a limit, such as “7 days, at most 20 opens”. Once the limit is reached the link starts no new sessions; people already in keep theirs.
Invitations by e-mail
If you want to know who is visiting, invite an e-mail address instead. The invited person needs no account: they type their e-mail on the site and sign in with the six-digit code we send. Members of your team can always sign in this way. Someone you remove loses access within a minute.
A visitor of a private site can also ask for access. You get an e-mail; approving it invites them and tells them they can sign in.
Keeping some pages open
While the rest of the site is closed, you can keep a landing page or a press kit public. Add paths
such as / or /press/* under “Pages open to everyone” on the Access page, and include the files
those pages load, such as /assets/*.
Signing everyone out
If a link went to the wrong place or a presentation is over, “Sign out everyone” ends every visitor’s session at once. Links and invitations keep working; visitors come back in the usual way.
From the command line
taslak access password --password "a-long-password"
taslak access private
taslak share "Agency review" --days 7