Password protection
Docs · Access control

How to password-protect a static site without writing code

The short answer: upload your site to Porch, then go to Manage Access, set the mode to Password, and choose a password. Anyone visiting your URL sees a password screen before the app loads — no .htaccess, no nginx, no backend code.

How Porch password protection works

Porch’s access control is handled at the network layer by a Cloudflare Worker that sits in front of every Porch. When you set a password, every request to your URL first hits the Worker, which checks for a valid session. If the visitor doesn’t have one, they see a password gate — your app never loads until they enter the correct password.

This means password protection is enforced regardless of what’s in your HTML. You don’t need to modify your source files at all. The gate works even for single-file HTML apps with no build system.

Step 1: Deploy your site to Porch

If you haven’t already, create a free Porch account and deploy your site. See the deploy a folder guide if you need help with that step.

Step 2: Go to Manage Access

From your Porch dashboard, click on the app you want to protect. Click the Manage Access button on the app detail page.

Step 3: Set the access mode to Password

In the access panel, select Password from the three access mode options (Public, Password, Invite-only). A text field appears — enter the password you want visitors to use, then click Save.

The change takes effect immediately. Anyone who visits your URL will now see a password prompt before your app loads.

Tip: You can change the password or switch access modes at any time without re-deploying your app. The app files and URL stay the same — only the access rule changes.

Step 4: Share the link and password

Copy your Porch URL from the dashboard. Send it along with the password — via text, email, a Slack DM, or whatever works for your audience. When they visit the link, they’ll see a simple password entry screen before your app loads.

Password protection vs invite-only access

Password protection is great when you want to share with a group and one shared password is enough. If you need to control access per-person — for example, to revoke a single person’s access later — use invite-only access instead. With invite-only, you specify each email address individually, and each person gets a magic link they click to verify. No password to share or forget.

Frequently asked questions

Do visitors need a Porch account to enter the password?+

No. Visitors just see a simple password form. They enter the password you set, the session is stored in a cookie, and they get access. No account, no sign-up.

What happens to someone who already has the password when I change it?+

Their existing session is invalidated. The next time they visit your Porch, they’ll see the password gate again and need to enter the new password.

Can I go back to public access after setting a password?+

Yes. Go to Manage Access and switch the mode back to Public. The password gate disappears immediately.

Is password protection available on the free tier?+

Yes. Password protection is included on the free tier. Invite-only access (where you specify individual email addresses) requires a paid plan.

Porchdeploy and share small web apps for the people you know.

We use analytics cookies to improve Porch. Privacy Policy