WordPress · Drupal · Site Maintenance · Technical SEO · Editorial Policy

How to Protect a Prismic Site From Bots and Brute-Force Logins

Prismic is a hosted, headless CMS. That changes what bot protection means. There is no public /wp-login.php on your own server for attackers to hammer, because the editing interface and content backend run on Prismic’s side. What you do control is who has access to your repository, which tokens and webhooks exist, and the front-end app you deploy yourself.

This guide splits the job along that line: the accounts and credentials you manage inside Prismic, and the website, forms and hosting layer you run outside it.

Where bots actually hit a Prismic site

Bots go after whatever is reachable and cheap to try. On a Prismic project that usually means four places:

  • Prismic user accounts. Credential stuffing reuses email and password pairs leaked from other services. If a team member reused a password, the bot never needs to guess anything.
  • Exposed tokens. An API access token or webhook secret committed to a public code repository, pasted into a front-end bundle or shared in a chat can be found and reused automatically.
  • Your forms. Contact, newsletter and quote forms are the main spam target. Prismic does not process these for you, so they are handled by your front-end app or a third-party form service.
  • Your pages and API routes. Scrapers copy published content, and noisy crawlers can drive up requests to any server-side routes your framework app exposes.

Prismic’s own infrastructure handles its login and content delivery. Check Prismic’s documentation and security information for the protections it applies and for the account features your plan includes. Everything else on this list is your responsibility.

Lock down repository accounts

Brute-force and credential-stuffing defence for a hosted CMS is mostly account hygiene. Work through these steps:

  1. Use a unique password for every person. A password manager makes long, random passwords practical. Reusing a password across services is what makes credential stuffing work.
  2. Turn on two-factor authentication where it is offered. Whether it is available, and in what form, can depend on your account and plan, so check the current Prismic documentation. If your team signs in through a third-party identity provider such as Google or GitHub, secure that account with two-factor authentication instead, because it becomes the real front door.
  3. Give each person the lowest role that lets them work. Prismic repositories support user roles, so writers who only draft content do not need the permissions of someone who manages settings. An attacker who takes over a low-privilege account can do far less damage.
  4. Remove people promptly. When a contractor or employee leaves, take them out of the repository the same day.
  5. Keep ownership with named people. Avoid shared logins. A shared account hides who did what and makes it hard to tell whether a sign-in was legitimate.

Hosted platforms do not give you a login URL to hide, so skip the security-through-obscurity tricks you may know from self-hosted CMSs. Strong credentials and a second factor are what protect the sign-in.

Treat tokens and webhooks as secrets

Your repository’s API access can be public or restricted behind access tokens, and Prismic also uses tokens for write access and other integrations. Webhooks let Prismic notify your build or deploy system when content changes.

  • Keep tokens out of source control. Store them as environment variables in your hosting platform and your local, git-ignored environment file, never in committed code.
  • Keep secret tokens on the server. Anything shipped to the browser is visible to every visitor and every bot. Use a token with the narrowest access that works, and fetch content on the server or at build time when you can.
  • Set a secret on webhooks if the option is offered, and have your receiving endpoint reject requests that do not carry it. Otherwise anyone who finds the URL can trigger rebuilds.
  • Rotate on suspicion. If a token may have leaked, generate a new one, update your deployment, and revoke the old one.

The Prismic documentation covers how access tokens and webhooks are configured for your repository.

Stop spam, scraping and floods on your front end

Because you deploy the front-end app yourself, rate limiting and bot filtering sit with your hosting and CDN setup. What is available depends on the platform you chose, so look at its firewall or security settings first.

Rate limiting and a web application firewall

Many hosting and CDN providers offer rate limiting and managed firewall rules, sometimes only on certain plans. Where you have them, apply stricter limits to form endpoints and server-side API routes than to ordinary page views, and challenge or block traffic that repeatedly hits those routes. If your platform has no such feature, put a CDN or firewall service in front of the site, or add rate limiting inside the route handlers that process submissions.

Protect every form

Spam bots submit forms directly to your endpoint without loading the page, so protection has to work on the server:

  • Validate and sanitise every field on the server, not only in the browser.
  • Add a CAPTCHA or a privacy-friendlier bot challenge, and verify the response token on the server before accepting the submission.
  • Add a hidden honeypot field that real people never fill in, and discard submissions where it has a value.
  • Limit submissions per IP address or per session over a short window.
  • Send submissions to a service that has its own spam filtering if you do not want to maintain this yourself.

Limit scraping sensibly

Content you publish is public by design, so you cannot fully prevent copying. You can make bulk scraping harder and cheaper to ignore: cache pages at the CDN so crawlers do not hit your origin, rate limit unusually fast clients, and use robots.txt for well-behaved crawlers, knowing that abusive bots ignore it. Do not rely on it as a security control.

Keep the app and its dependencies clean

The npm packages in your framework project are part of your attack surface, and no CMS vendor patches them for you. Update them on a regular schedule, review audit warnings from your package manager, and commit your lockfile so builds are repeatable. Add standard security headers, including a Content Security Policy, which MDN explains in detail, and review your code against the OWASP Top Ten for common web risks such as injection and broken access control.

Prismic bot protection checklist

  • Every repository user has a unique, long password stored in a password manager.
  • Two-factor authentication is on for each user, or for the identity provider they sign in with.
  • Roles follow least privilege and former team members are removed.
  • No access token or webhook secret appears in committed code or browser-delivered JavaScript.
  • Webhook endpoints verify the secret before acting.
  • Form handlers validate on the server, check a CAPTCHA token and use a honeypot.
  • Rate limiting or firewall rules cover forms and server-side routes.
  • Dependencies are updated on a schedule and security headers are set.

Frequently asked questions

Can bots brute-force the Prismic login?

Anyone can attempt to sign in to an account, since the login is hosted by Prismic rather than on your server. The practical defence is strong, unique passwords and two-factor authentication, which makes guessed or leaked passwords much less useful. Check Prismic’s documentation for the security features on your plan.

Do I need a CAPTCHA if I use Prismic?

Prismic stores and delivers content, but it does not run your website’s forms. If your site has a contact or signup form, you need your own spam protection, and a server-verified CAPTCHA is one of the most effective layers alongside a honeypot and rate limiting.

Should I hide or change my Prismic login URL?

There is no self-hosted login page to relocate, so this technique does not apply. Spend that effort on account security, role management and token handling instead.

We use essential cookies to make this site work and remember your preferences. We do not use advertising or analytics cookies. Privacy Policy. Cookie Policy.