Checkpoint Docs
Cookbooks

Enforce: Gateway Setup

Block AI agents at the edge with zero code changes using DNS-based enforcement

Goal

Set up Checkpoint Gateway to enforce AI agent policies at the DNS/edge level — no code changes required. By the end of this cookbook, you'll have:

  • Traffic routing through Checkpoint's edge network
  • WASM-based detection running on every request
  • Automatic SSL/TLS certificate provisioning
  • Policy enforcement (block, redirect, challenge) for detected agents

Best for: Protecting any website or API without touching application code. Works with any origin server.

Prerequisites

  • A Checkpoint account with a project created
  • A domain or subdomain you control
  • Access to your domain's DNS settings

Time Estimate

10-15 minutes (plus DNS propagation time)


Steps

Create a Gateway in the Dashboard

  1. Log into your Checkpoint dashboard

  2. Select your project (or create one)

  3. Navigate to Settings → Enforce

  4. Click Add Gateway

  5. Enter the domain or subdomain to protect:

    • For subdomains: shop.example.com, api.example.com
    • For apex domains: example.com
  6. Click Create Gateway

The dashboard will generate the DNS records you need.

Copy the DNS Configuration

After creating the gateway, you'll see the required DNS configuration:

For subdomains (most common):

Type:  CNAME
Name:  shop (or your subdomain)
Value: detect.checkpoint-gateway.ai
TTL:   Auto (or 300)

For apex/root domains:

If your DNS provider supports CNAME flattening (Cloudflare, Route 53, Netlify):

Type:  CNAME
Name:  @ (or leave blank)
Value: detect.checkpoint-gateway.ai
TTL:   Auto

If CNAME flattening isn't supported, use the A record shown in your dashboard.

Copy the exact values from your dashboard — they may include project-specific parameters.

Configure Your DNS

  1. Log into Cloudflare dashboard

  2. Select your domain

  3. Go to DNS → Records

  4. Click Add record

  5. Configure:

    • Type: CNAME
    • Name: Your subdomain (e.g., shop) or @ for apex
    • Target: detect.checkpoint-gateway.ai
    • Proxy status: DNS only (gray cloud) — Important!
    • TTL: Auto
  6. Click Save

Important: Set the Cloudflare proxy to "DNS only" (gray cloud icon). Orange cloud (proxied) will break the Gateway.

  1. Log into AWS Console

  2. Go to Hosted zones

  3. Select your domain

  4. Click Create record

  5. Configure:

    • Record name: Your subdomain (e.g., shop)
    • Record type: CNAME
    • Value: detect.checkpoint-gateway.ai
    • TTL: 300
  6. Click Create records

  1. Log into Namecheap

  2. Go to Domain ListManage on your domain

  3. Click Advanced DNS

  4. Click Add New Record

  5. Configure:

    • Type: CNAME
    • Host: Your subdomain (e.g., shop) or @ for apex
    • Value: detect.checkpoint-gateway.ai
    • TTL: Automatic
  6. Click the checkmark to save

  1. Log into GoDaddy

  2. Go to My ProductsDNS on your domain

  3. Click Add in the Records section

  4. Configure:

    • Type: CNAME
    • Name: Your subdomain (e.g., shop) or @ for apex
    • Value: detect.checkpoint-gateway.ai
    • TTL: 1 Hour
  5. Click Save

Wait for Verification

Return to your Checkpoint dashboard. The Gateway status will progress through:

StatusMeaningTypical Time
PendingDNS change not yet detected1-5 minutes
ProvisioningSSL certificate being issued1-3 minutes
ActiveGateway is live!

DNS propagation can take up to 48 hours in rare cases. Most providers propagate within 5-15 minutes.

Verify DNS manually:

# Check if CNAME is set correctly
dig shop.example.com CNAME +short
# Should return: detect.checkpoint-gateway.ai

# Check if the domain resolves
curl -I https://shop.example.com
# Should return headers including x-checkpoint-* headers

Configure Enforcement Policies

Once the Gateway is active, configure how detected agents are handled:

  1. In your dashboard, go to Settings → Enforce → Policies
  2. Create a new policy or edit the default

Example: Block all AI agents

Name: Block AI Agents
Condition:
  - detection_class equals "ai_agent"
Action: Block
Response:
  - Status: 403
  - Body: 'AI agent access is not permitted'

Example: Allow verified ChatGPT, block others

Name: Verified Agents Only
Condition:
  - detection_class equals "ai_agent"
  - signature_verified equals false
Action: Block
Response:
  - Status: 403
  - Body: 'Unverified agent access denied'

Example: Redirect bots to static page

Name: Redirect Bots
Condition:
  - detection_class equals "bot"
  - agent_name not_in ["Googlebot", "Bingbot"]
Action: Redirect
Target: https://example.com/bot-notice

Test the Gateway

Test as a human visitor:

curl -I https://shop.example.com
# Should return 200 OK with your origin's response

Test as ChatGPT:

curl -I -H "User-Agent: Mozilla/5.0 (compatible; GPTBot/1.0)" \
  https://shop.example.com
# Should return 403 (if blocking AI agents)

Test as Googlebot (if allowed):

curl -I -H "User-Agent: Googlebot/2.1" \
  https://shop.example.com
# Should return 200 OK (if Googlebot is allowed)

Check your dashboard → Analytics to see the detections logged.


Understanding Gateway Headers

The Gateway adds headers to requests forwarded to your origin:

HeaderValueDescription
x-checkpoint-classhuman, ai_agent, botDetection classification
x-checkpoint-confidence0-100Confidence score
x-checkpoint-agent-nameChatGPT, Claude, etc.Identified agent name
x-checkpoint-verifiedtrue, falseSignature verification status
x-forwarded-forClient IPOriginal client IP

Your origin can use these headers for additional logic:

// Express example
app.get('/api/data', (req, res) => {
  const detectionClass = req.headers['x-checkpoint-class'];

  if (detectionClass === 'ai_agent') {
    // Return limited data for AI agents
    return res.json({ data: 'limited' });
  }

  res.json({ data: 'full' });
});

Verify It's Working

Dashboard Verification

  1. Go to Analytics in your dashboard
  2. You should see requests categorized by detection class
  3. Blocked requests will show in the Enforced tab

Health Endpoint

The Gateway exposes health endpoints:

# Health check
curl https://shop.example.com/__gateway/health
# Returns: { "status": "ok" }

# Readiness check
curl https://shop.example.com/__gateway/ready
# Returns: { "ready": true }

# Version info
curl https://shop.example.com/__gateway/version
# Returns: { "version": "x.x.x", "region": "..." }

Troubleshooting

DNS Not Detected

SymptomCauseFix
Status stuck on "Pending"DNS not propagatedWait 15-30 minutes, then check with dig
Wrong CNAME targetTypo in DNS recordVerify exact value from dashboard
Conflicting A recordA record exists for same nameDelete the A record

SSL Certificate Not Provisioning

  • Check DNS again — Must resolve correctly before cert issuance
  • Check CAA records — Remove or add Cloudflare to allowed issuers
  • Cloudflare users — Ensure proxy is OFF (gray cloud)

Origin Not Reachable

  • Check firewall — Allow Cloudflare IP ranges
  • Check origin URL — Verify in dashboard settings
  • Check HTTPS — Origin must support HTTPS

Requests Not Being Blocked

  • Check policy order — Policies evaluate top-to-bottom
  • Check conditions — Verify detection class matches
  • Check confidence threshold — Low-confidence detections may not match

What You Learned

  • How to create and configure a Checkpoint Gateway
  • How to update DNS records for different providers
  • How to configure enforcement policies
  • How to test Gateway functionality
  • How to use Gateway headers in your origin

Next Steps

GoalNext Cookbook
Fine-tune policiesPolicy Configuration
Code-level enforcementMiddleware Enforcement
Monitor trafficDashboard Analytics
Authorize agentsGovern Overview