Skip to main content

Quick Start Guide

This guide will help you get up and running with DarkForest Protocol in just a few minutes.

Getting an API Key

Before implementing DarkForest Protocol, you'll need to register for an API key:

  1. Visit https://darkestforest.xyz
  2. Enter your email address and website domain on the Protocol page
  3. Click "Register" to receive your API key

Your API key will be shown immediately. This key is used to authenticate your requests to the DarkForest API and track analytics for your website.

Choosing an Integration Method

DarkForest Protocol offers three integration methods:

1. Reverse Proxy Integration (Simplest)

If you're using Nginx, Apache, Cloudflare, or another proxy server, this is the easiest way to implement DarkForest Protocol. You'll add a few lines to your server configuration to detect and redirect AI bots.

View Reverse Proxy Integration Guide

If you're using a supported web framework like Express, Next.js, or Vercel Edge, you can use our middleware package for a clean integration.

Install the DarkForest blocker package:

npm install darkforest-blocker

Then add the middleware to your application:

// Express example
const { createExpressBlocker } = require('darkforest-blocker/express');

const darkforestMiddleware = createExpressBlocker({
apiKey: 'your-api-key',
presetCategories: ['ai-search-bots', 'ai-crawl-bots']
});

app.use(darkforestMiddleware);

View Middleware Integration Guide

3. Universal Integration (Advanced)

For custom implementations in any language or framework, you can use our universal integration approach.

View Universal Integration Guide

Verifying Your Implementation

To verify that DarkForest Protocol is working correctly:

  1. Use a tool like cURL to simulate an AI bot request:
curl -A "GPTBot" https://your-website.com
  1. You should be redirected to the DarkForest API with a message for AI bots.

  2. Check your DarkForest analytics dashboard to see the recorded visit.

Next Steps