Overview
Theredirect responder sends a 308 Permanent Redirect response to matching requests, directing them to a different URL. This is useful for redirecting unwanted traffic away from your site or to honeypot pages.
Configuration Options
| Option | Required | Description |
|---|---|---|
url | Yes | The destination URL for the redirect |
The
url field is required when using the redirect responder.When to Use
Use theredirect responder when:
- You want to send bots/scrapers to a honeypot or decoy site
- You need to redirect traffic to an alternative service
- You want to redirect blocked users to an informational page
- You want to send AI scrapers to misleading content
HTTP 308 vs Other Redirects
Theredirect responder uses HTTP 308 Permanent Redirect:
- Indicates the redirect is permanent (like 301)
- Guarantees the request method won’t change (unlike 301/302)
- Tells clients to always use the new URL in the future
- More reliable for POST/PUT requests than 301/302
Configuration Examples
- Caddyfile
- JSON
Real-World Use Cases
Response Behavior
When a redirect is triggered:- HTTP status code: 308 Permanent Redirect
- Location header: Set to the configured URL
- Response body: Minimal redirect message
- Connection: Closed after response is sent
The redirect URL can be any valid HTTP/HTTPS URL, including external domains or specific paths on your own domain.
Combining with Other Strategies
You can use redirects strategically with other responders:- Blocks the worst offenders immediately
- Redirects AI scrapers to misleading content
- Serves legitimate content to real users