Skip to content
nsin docs

Rules Overview

Rules tell nsin how to handle requests: redirect, cache, slow attackers, block traffic, or route to another server — at the edge.

Create rules in your domain’s Rules section.

A rule pairs a When (matching requests) with a Then (nsin’s action).

RuleWhat it doesGuide
RedirectSend to a new address.Redirects
URL RewriteRewrites the server address invisibly.URL Rewrites
CacheSets caching, duration, bypasses.Cache Rules
HeaderAdds, changes or removes headers.Header Rules
BlockBlocks by path, host or country.Blocking Traffic
Rate LimitCaps requests per visitor.Rate Limiting
WAFManaged web attack protection.WAF
ChallengeProves a visitor is human.Bots & Challenges
BotsAllows, blocks or reroutes crawlers and AI bots.Bots & Challenges
FingerprintMatches disguised automated traffic.Bots & Challenges
Origin PoolMultiple servers, health checks, failover.Origins & Failover
Origin RouteRoutes specific paths to a server.Origins & Failover
Error PageCustomizes the error page shown.Custom Error Pages

Two more, no guide yet: Web Optimization (shrinks images/JS/CSS) and Basic Auth (password-protects a path).

  1. Open Rules.
  2. Click Add Rule.
  3. Pick the type.
  4. Set When and Then.
  5. Click Save.

Rules narrow three ways, combined:

  • Records — DNS records to cover; empty means whole zone (usual).
  • Hostname — exact host, wildcard (*.example.com), or pattern.
  • Path — includes (/* default) and excludes lists; wildcard or regex, capture groups.

Same-type rules run top to bottom, higher first; drag to reorder.

Most types save as dry run: nsin logs the match, lets the request through.

Use it for blocks, challenges and filters. Caching ignores dry run.

Each rule has a toggle: switch off instead of deleting.

Rules only run on traffic reaching the nsin edge; an unproxied record bypasses them. If a rule seems inactive, check this first: Managing DNS Records.

Start with Redirects — the easiest rule to make.