Naijacloud
Docs

Protect your app

Every app on a naijacloud.app address runs behind Cloudflare, with DDoS protection that is always on. On top of that, each web service has a Protection card with a rate limit, bot rules and an Under attack switch. Everything there is off until you turn it on.

5 min read

What is always on

You do not need to set anything up for these.

  • DDoS protection. Every app on a naijacloud.app address goes through Cloudflare's network. Attacks that flood an app with traffic are absorbed at the edge, before they reach your app.
  • Secret files are blocked. Requests for files such as /.env, /.git, /.aws and /.ssh are turned away at the edge. Bots probe for these all day. They never reach your app.
  • A safety net per visitor. One visitor who sends a very large number of requests in a few seconds is blocked for a short while. Normal visitors never get near it.
  • Search engines and AI crawlers get through. Verified crawlers such as Google, Bing, ClaudeBot, ChatGPT and Perplexity are always let through. We never quietly block AI agents from your app.

Custom domains are moving behind Cloudflare over the coming days. Until a domain has moved, the always-on protection above covers your app's naijacloud.app address, and the Protection settings below still apply to the custom domain with the limits noted.

The Protection settings

Open your web service, go to Settings and find Protection. It is on every plan, Free included.

  • Changes apply in seconds. There is no redeploy and no restart.
  • Owners and admins change them. Everyone else in the workspace can see them.
  • Everything starts off. Turn on only what you need.

Rate limit

A rate limit caps how many requests one visitor can send. A visitor who goes over it gets a 429 Too Many Requests response until they slow down.

ChoiceLimit per visitorUse it for
OffNo limitThe default
Normal50 requests a second, bursts of 200Most apps. Shoppers and payment webhooks never get near it
Strict10 requests a second, bursts of 50Login, search or an API that is being abused
CustomYour own numbersPaid services only

Use Strict when one part of your app is under pressure. For example, someone is guessing passwords on your login page or hammering your search. A busy page that loads many images or API calls in one go can trip Strict, so check your app still works after you turn it on.

Custom limits are for paid services. Pick your own requests per second and burst. You can also limit only the paths you choose, such as /search or /api/login, and leave the rest of your app unlimited. Put one path per line.

Limit open requests

This caps how many requests one visitor can have open at the same time, at 50. It stops one visitor tying up your app with many slow requests at once.

Bot rules

Bot rules turn away requests that have no User-Agent, and requests from scraping tools such as curl, python-requests and headless browsers.

AI and search crawlers are always allowed, with bot rules on or off. You can also choose to block SEO crawlers such as Ahrefs and Semrush.

Bot rules also turn away your own scripts and webhooks if they use these tools. A cron job on another server that calls your app with curl, or a partner's webhook sent with python-requests, gets refused. Give those callers a proper User-Agent, or leave bot rules off.

Under attack

Turn this on while your app is under attack. Cloudflare then checks every visitor's browser before they reach your app. People on a normal browser pass the check and carry on.

Choose how long it stays on: 1 hour, 6 hours, 24 hours, or until I turn it off. It switches itself off at the end.

Under attack can stop API clients and webhooks, because they cannot pass a browser check. Paths that contain /webhook, /callback or /.well-known/ are never checked, so payment and sign-in callbacks still land. Turn it off as soon as the attack ends.

Under attack works through Cloudflare, so it covers your naijacloud.app address. On a custom domain it applies once that domain has moved behind Cloudflare.

Custom domains not yet behind Cloudflare

On some custom domains we cannot yet tell one visitor from another. On those, the rate limit and the open request limit do not apply. Bot rules still do. This goes away when the domain moves behind Cloudflare.

If your app runs out of memory

An attack, or a busy day, can push an app past its memory. When an app runs out of memory and is restarted, we email its owner to say so. The email gives the app's memory limit and the peak it reached, so you know to look at its size rather than its network. See Instance types & regions.