GateCheck

GateCheck docs

Everything GateCheck does, and every way to plug into it.

Quick start

  1. Make an account and add your site’s domain. Subdomains are covered too.
  2. Copy the snippet from the dashboard. It has your public key in it.
  3. Paste it at the very top of the <head> of every page, before other scripts.
  4. Add a few lines to your privacy policy saying you use GateCheck. Here’s wording you can use.
<style id="gatecheck-hide">html{visibility:hidden!important}</style>
<script src="https://gatecheck.me/shield.js?key=pk_live_YOUR_PUBLIC_KEY"></script>
<noscript><style>html{visibility:visible!important}body>*{display:none!important}body::before{content:"This website needs JavaScript to check your visit. Turn it on and reload the page.";display:block;padding:24px;font:16px/1.5 system-ui,sans-serif}</style></noscript>

The first line hides the page; the script shows it again once GateCheck says yes, usually in a fraction of a second. If the script is blocked or removed, the page stays hidden. The last line shows browsers with JavaScript turned off a short message instead of the page. It’s plain CSS, not a redirect, so crawlers that read your HTML without running scripts (search engines, AdSense, link previews) stay on your page.

If you added GateCheck before December 3, 2026, your last line may be a <meta http-equiv="refresh"> redirect. Replace it with the new one from your dashboard: the old line sends crawlers that don’t run JavaScript, such as the AdSense verifier, away from your site.

Your public key is meant to be seen: it only works from your own domain. Keep your secret key on your server.

How a visit is decided

Every visit is screened against public threat lists (Spamhaus, FireHOL, blocklist.de and more), VPN and hosting network lists, checks that a search engine is really who it says, and signs of automation such as tool user agents or a browser being driven by software. Each visit gets one verdict:

VerdictMeansWhat happens by default
PersonAn ordinary home, office or mobile connectionWalks straight in
Good botA search engine or crawler, proven by its published address ranges or reverse DNSWalks straight in (you can turn this off)
VPNA VPN, proxy or privacy relayCAPTCHA (you can let VPNs in, or block them)
BotAutomated traffic, or a cloud or hosting networkCAPTCHA (you can block hosting networks)
AttackerListed on threat listsBlocked, or a CAPTCHA when the address is shared by many people

Manual bans always block. Too many requests from one address get a CAPTCHA, then a 429.

Settings

Protection
Off lets everyone in (bans still apply).
Watch only
GateCheck checks and logs every visit as usual, but never hides the page, asks for a CAPTCHA or blocks anyone. Your logs show what it would have done. Add data-hide="off" to the script tag too, so the page never waits for the check.
Allow good bots
On by default. Verified search engines and crawlers (Google, Bing, Apple, DuckDuckGo, OpenAI, Perplexity and others) skip the check. A bot that only claims to be Googlebot is treated as a fake.
VPN visitors
Ask for a CAPTCHA (default), let them in, or block them. “Let them in” still asks VPNs run from hosting networks, where most VPN abuse comes from.
Hosting networks and other bots
Ask for a CAPTCHA (default) or block them.
Rate limiting
Normal: past 120 page loads a minute a visitor gets a CAPTCHA, past 360 a 429 and a cooldown that doubles each time. Strict: 30 and 90. Or off.
Block ban evasion
A banned visitor who comes back from another address on the same browser is banned there too.
Block embedding
Other websites can’t show your pages in a frame without a key. See Embedding.
Bots you let in
Names of bots you rely on, such as an uptime monitor or link previews (facebookexternalhit, Discordbot). Any visitor whose user agent contains one is let in, unless it’s pretending to be a crawler it isn’t or is on a list of known attackers. Search engines and Google’s ad crawlers are already let in, checked against the addresses they publish.
Always open
Paths everyone can read without a check, and that aren’t logged. By default: /robots.txt, /ads.txt, /app-ads.txt, /sitemap.xml and everything under /.well-known/. A path ending in / covers everything under it.
Score threshold (advanced)
Off by default and not recommended: GateCheck already decides who’s who. When on, anyone whose risk score reaches the number gets a CAPTCHA.
Sign-up and sign-in paths (advanced)
Lets a ban cover only those parts of your site. Needs the server check, which sees the path.

What stopped visitors see

A CAPTCHA on captcha.gatecheck.me. Once solved, they go straight back to the page they wanted, with a pass that lasts 12 hours on that address. A pass never opens a block.

The blocked page on blocked.gatecheck.me, with the reason, time and a trace ID. If you allow it, they can ask for a review: their answers arrive under Review requests, and you can be alerted by Discord or webhook.

Both pages only open from a real, recent stop. A made-up or changed link goes to gatecheck.me instead. A CAPTCHA can’t be turned off on GateCheck’s pages. You choose the headline, message, questions, colors, logo and mascot under Block page.

Which CAPTCHA

Under Block page › CAPTCHA, pick what GateCheck’s pages use:

GateCheck’s CAPTCHA (default)
Run by GateCheck: Cloudflare Turnstile, where most people pass without doing anything. While Turnstile is being set up it’s Google reCAPTCHA, and if Google isn’t sure the visitor gets a few seconds of browser check instead.
Browser check only
No Google. The visitor’s browser solves a small puzzle for a few seconds.
Your keys
Cloudflare Turnstile (the default), reCAPTCHA v2 (checkbox), reCAPTCHA v3 (invisible) or hCaptcha, with your own keys. Allow captcha.gatecheck.me and blocked.gatecheck.me in your provider’s settings for the key.

Your own CAPTCHA and blocked pages

Set your own addresses under Block page › Your own pages. Stopped visitors are sent there with a ticket in the address (?t=…). Your page reads the ticket with the API below. Tickets are signed, last 20 minutes and only work for your site, from your own domain.

A CAPTCHA page

Use your own CAPTCHA keys (Turnstile, reCAPTCHA v2 or v3, or hCaptcha), set under Block page › CAPTCHA, and allow your own domain for the key. GateCheck checks the answer with your secret key. Until you add keys, info.captcha is { provider: "pow", bits }: GateCheck’s browser check, where sha256(ticket + ":" + nonce) must start with bits zero bits; send { ticket, nonce }.

With reCAPTCHA v3, run grecaptcha.execute(siteKey, { action: "gatecheck" }) and send the token. Scores under 0.5 get 403 with fallback: { token, bits }: solve the browser check at that many bits and send { ticket, nonce, fallback: token }.

<!-- https://example.com/verify — set it in Block page › Your own pages -->
<div id="captcha"></div>
<script src="https://js.hcaptcha.com/1/api.js?render=explicit" async onload="start()"></script>
<script>
  const ticket = new URLSearchParams(location.search).get('t');
  async function start() {
    // What GateCheck stopped, and which CAPTCHA to show (your own keys from the Block page tab).
    const info = await fetch('https://gatecheck.me/v1/tickets/' + ticket).then(r => r.json());
    hcaptcha.render('captcha', { sitekey: info.captcha.siteKey, callback: solved });
  }
  async function solved(captchaToken) {
    const answer = await fetch('https://gatecheck.me/v1/challenge', {
      method: 'POST', headers: { 'content-type': 'application/json' },
      body: JSON.stringify({ ticket, captchaToken })
    }).then(r => r.json());
    location.replace(answer.returnUrl); // back to the page, with the pass for shield.js
  }
</script>

You can set your own pages to use no CAPTCHA at all. That is extremely not recommended: bots can then unlock themselves and flood your review requests.

A blocked page

const ticket = new URLSearchParams(location.search).get('t');
const info = await fetch('https://gatecheck.me/v1/tickets/' + ticket).then(r => r.json());
// info.kind === 'blocked', info.domain, info.reason, info.traceId, info.requestedAt
// info.review is null, or { questions: [...] } when you accept review requests.
await fetch('https://gatecheck.me/v1/appeals', {
  method: 'POST', headers: { 'content-type': 'application/json' },
  body: JSON.stringify({ ticket, answers: { 0: 'Shopping', 1: 'I am a person' }, captchaToken })
});

In your page’s code

<script>
  // Runs once GateCheck has answered. result.action is "allow", "challenge",
  // "block", "embed" or "error" (GateCheck couldn't be reached).
  document.addEventListener('gatecheck', event => {
    if (event.detail.action === 'allow') startChat();
  });
  // Or wait for it anywhere:
  window.GateCheck?.ready?.then(result => console.log(result.action, result.traceId));
</script>
data-fail="closed"
On the script tag: keep the page hidden and show a “try again” notice if GateCheck can’t be reached. By default the page is shown after 8 seconds, so an outage never takes your site down.
data-hide="off"
Never hide the page; only check and redirect. Leave out the first line of the snippet too.
gc_pass cookie
Set by the script after a CAPTCHA, so your server check can pass it on.

Checking on your server

The script runs in the visitor’s browser, so tools that don’t run JavaScript (like curl) never meet it. To check every request, including those, ask GateCheck from your server before you answer. Make a secret key under Integrations, then call:

POST https://gatecheck.me/v1/edge-verify
Authorization: Bearer sk_live_…
Content-Type: application/json

{
  "url": "https://example.com/checkout",      // the page being asked for
  "ip": "203.0.113.7",                          // the visitor's address, from a header YOU trust
  "userAgent": "Mozilla/5.0 …",
  "headers": { "accept": "…", "accept-language": "…", "sec-ch-ua": "…",
               "sec-fetch-site": "…", "sec-fetch-mode": "…" },
  "pass": "v1.…"                                // the gc_pass cookie, if the visitor has one
}

200 { "action": "allow", "traceId": "trc_…" }
200 { "action": "challenge", "reason": "vpn", "traceId": "trc_…", "redirectUrl": "https://captcha.gatecheck.me/?t=…" }
200 { "action": "block", "reason": "malicious", "traceId": "trc_…", "redirectUrl": "https://blocked.gatecheck.me/?t=…" }
429 { "action": "block", "reason": "rate_limit", … }   // too many requests; Retry-After is set

Send the visitor on to redirectUrl for anything but allow. If GateCheck can’t be reached, answer 503 rather than letting the request through. Ready-made middleware for Express, Next.js, FastAPI and Cloudflare Workers is in the dashboard. Here is Express:

// Express (Node.js 18+); store your key in GATECHECK_SECRET_KEY.
// Configure trust proxy only for reverse proxies you control.
const gatecheck = async (req, res, next) => {
  try {
    const url = new URL(req.originalUrl, req.protocol + '://' + req.get('host')).href;
    const check = await fetch('https://gatecheck.me/v1/edge-verify', {
      method: 'POST',
      headers: {
        authorization: 'Bearer ' + process.env.GATECHECK_SECRET_KEY,
        'content-type': 'application/json'
      },
      body: JSON.stringify({
        url,
        ip: req.ip || '',
        userAgent: req.get('user-agent') || '',
        headers: {
          accept: req.get('accept') || '',
          'accept-language': req.get('accept-language') || '',
          'sec-ch-ua': req.get('sec-ch-ua') || '',
          'sec-fetch-site': req.get('sec-fetch-site') || '',
          'sec-fetch-mode': req.get('sec-fetch-mode') || ''
        },
        // Set by the script tag after a solved CAPTCHA.
        pass: (req.get('cookie') || '').match(/(?:^|;\s*)gc_pass=([\w.-]+)/)?.[1]
      })
    });
    if (!check.ok && check.status !== 429) return res.status(503).send('Protection check unavailable');
    const result = await check.json();
    if (result.action !== 'allow') return res.redirect(302, result.redirectUrl);
    return next();
  } catch (error) {
    console.error('GateCheck verification failed:', error);
    return res.status(503).send('Protection check unavailable');
  }
};

app.use(gatecheck);

To stop framing completely on your server, also send Content-Security-Policy: frame-ancestors 'self' (add the sites you allow).

Hosted protection (paid)

No code at all: GateCheck answers for your domain and passes allowed requests on to your real server. Every request is checked, including tools that never run JavaScript. Ask us to turn it on, then under Integrations › Hosted protection:

  1. Enter the address visitors use (for example www.example.com) and your real server’s address.
  2. Add the CNAME record shown, at your DNS provider. HTTPS is set up for you.
  3. Make your server refuse requests that don’t carry the X-GateCheck-Proxy secret, so nobody can go around GateCheck.
  4. Switch it to live.

Your server gets the visitor’s address in X-Forwarded-For and the trace ID in X-GateCheck-Trace. Images, scripts and other files of an allowed page are let through for five minutes without a fresh check.

Each site has a request limit per minute (600 to start) and at most 20 requests in flight at once; past that, visitors get a short “try again” answer. Uploads are limited to 10 MB.

Leaderboard protection (coming soon)

A paid feature for games: GateCheck checks each score before it reaches your leaderboard, who sent it, and whether it could really have been played. Ask for it from Integrations to hear when it’s ready.

Embedding

With Block embedding on, a page shown inside another website’s frame is replaced by a notice saying the site doesn’t allow embedding, with a Go to the website button and a Request embedding button. The other site’s owner fills in a short form; you approve or decline it under Integrations › Embedding, and they collect their key from their request page.

A key only works on the website it was made for. You can make a universal key that works anywhere, but anyone who gets it can frame your pages.

<!-- On partner.com, with a key you made for partner.com -->
<iframe src="https://example.com/?gc_embed=ek_live_…" width="600" height="400"></iframe>

The Integrations tab shows how many people saw your pages inside each other website over the last 30 days. Only the counts are kept, with nothing about the viewers, and bots aren’t counted.

Frames that are allowed still get GateCheck’s checks. If a visitor in a frame needs a CAPTCHA, they’re asked to verify once in a new tab; after that the frame lets them in for 12 hours.

Keys and account safety

  • Public keys (pk_live_) go in your pages and are always shown in the dashboard. They only work from your domain.
  • Secret keys (sk_live_) are shown once. GateCheck keeps only a fingerprint and the first few characters.
  • Rotating or revoking a key, or making a second one, asks for your password if you haven’t entered it in the last 10 minutes, and for a code sent to your email.
  • Removing a site needs the same, then waits five minutes, during which you can keep it.

Data and retention

Each visit is recorded with its address, network, country, decision and reason. On the free plan, visitor IP addresses are deleted after 30 days; the rest of the record stays for your stats for a year. Paid plans (coming soon) keep addresses for a year. You can delete one record or all of them from Traffic logs at any time. Browser IDs used against ban evasion are deleted after 30 days. The visitor only ever learns the decision, never the evidence behind it.

Visit reports and address lookups

Click any visit in Traffic logs to see everything GateCheck knew about it: what it decided and how sure it was, how likely the visitor was to be on a VPN, automated or a known attacker, the network and where a VPN match came from, each piece of evidence, the lists the address is on, how the browser looked, and whether the visitor passed a CAPTCHA.

Look up an address, at the top of Traffic logs, screens any IP address the same way and shows the same report, plus how that address did on your sites. Nothing is logged. You get 100 lookups a month on the free plan and 1,000 with a paid site.

What to tell your visitors

The Terms ask you to tell your visitors that your website uses GateCheck, and to get any consent your law requires. Put something like this in your privacy policy, and adjust it to how you’ve set GateCheck up:

Security (GateCheck)
This website uses GateCheck (https://gatecheck.me), a security service, to keep out
bots and abuse. When you visit, GateCheck receives your IP address, details of your
browser (such as its type, language, time zone and screen size) and the page you're
visiting. It keeps a random ID and a one-way fingerprint of your browser so that
visitors we've blocked can't come straight back. If you're asked to complete a
CAPTCHA, the CAPTCHA provider (such as Google reCAPTCHA or Cloudflare Turnstile)
also receives your IP address. We use this only to keep this website secure.
Visit records are kept for up to a year; IP addresses are deleted after 30 days.
GateCheck's privacy policy: https://gatecheck.me/privacy

For a cookie notice

GateCheck stores these in visitors’ browsers. They’re there for security, not advertising or analytics; many privacy laws treat that kind of storage as strictly necessary, but check what yours says.

NameKindPurposeLasts
gc_passCookieShows the visitor already solved a CAPTCHA12 hours
gc_didLocal storageRandom device ID, so banned visitors can’t return on a new addressUntil cleared
gc_pass_…Local storageThe CAPTCHA pass, for the scriptWorks 12 hours
gc_embed_…Session storageAn embedding key while the page is in a frameUntil the tab closes

If you use hosted protection or the server check, the browser storage may not apply, but the rest does. Visitors can read GateCheck’s own Privacy Policy.

What a browser check can’t do

Anything sent to a browser can be read by its owner. The snippet keeps the page hidden until the visitor is checked, survives JavaScript being turned off, and the page stays hidden if the script is removed. But someone determined can still download your HTML with a tool, or edit the page in their own browser after it arrives. They only fool their own copy, not other visitors.

If a page must not reach unchecked visitors at all, use the server check, which runs before anything is sent, or hosted protection.

Answers and errors

401 invalid API key
The key is wrong or revoked. The script shows your page and logs this in the browser console.
403 origin is not registered
The page isn’t on the domain the key belongs to.
429
Rate limited. The answer still says where to send the visitor.
503
GateCheck couldn’t check the visit. Your server should answer 503 too.

Still stuck? Contact us.