Redirections
Integration Guides

Integration Guides

Learn how to integrate redirect lookups into your server infrastructure using our Edge Query API.

Integration Guides

These guides show you how to integrate the Redirections Edge Query API into your existing server infrastructure. Each guide provides step-by-step instructions from zero to working redirect lookups in approximately 30 minutes.

Available Platforms

Choose your platform to get started:

Web Servers

Application Frameworks

Integration Patterns

Each platform guide demonstrates two integration patterns. Choose the pattern that best fits your traffic volume and freshness requirements.

Pattern 1: Real-Time API Lookup

Best for: High freshness requirements, moderate traffic volumes (up to ~1000 req/min).

Every incoming request triggers a lookup to the Edge Query API. This provides the freshest redirect data with no sync delays, but adds API call latency to each request path.

Characteristics:

  • Freshness: Immediate (redirect changes apply within seconds)
  • Latency: Adds ~20-50ms per request (global edge network)
  • Complexity: Simple (no sync infrastructure needed)
  • Quota impact: Consumes API quota per request

When to use:

  • You need redirect changes to apply immediately
  • You have moderate traffic (<1000 requests/min on free tier, <10K on Pro)
  • Your application can tolerate 20-50ms additional latency
  • You prefer operational simplicity over maximum performance

Pattern 2: Periodic Sync + Local Config

Best for: High traffic volumes, performance-critical applications, cost optimization.

A background job periodically fetches all redirect rules from the Export API and generates local configuration files. Your server loads these files directly, providing zero-latency lookups at the cost of eventual consistency.

Characteristics:

  • Freshness: Eventual (5-60 minute sync intervals typical)
  • Latency: Zero (local config file lookups)
  • Complexity: Moderate (requires sync script and cron job)
  • Quota impact: Minimal (only export API calls)

When to use:

  • You have high traffic volumes (thousands of requests per second)
  • Sub-millisecond redirect lookup latency is required
  • Redirect changes can tolerate 5-60 minute propagation delay
  • You want to minimize API quota consumption

Choosing Your Pattern

FactorReal-Time LookupPeriodic Sync
Traffic volume<1K req/minAny volume
Freshness needSecondsMinutes
Latency tolerance20-50ms OKMust be <1ms
Operational complexityMinimalModerate
API quota impactHighLow

Most applications start with Real-Time Lookup for simplicity, then migrate to Periodic Sync as traffic grows or when performance optimization becomes critical.

Prerequisites

Before following any platform guide, you'll need:

  1. An API Key - Generate one in your project's Settings > API Keys section
  2. Your Project ID - Found in the project URL or dashboard
  3. At least one redirect rule - Create test rules to verify the integration

All guides use these placeholder values:

  • YOUR_API_KEY - Replace with your actual API key
  • YOUR_PROJECT_ID - Replace with your actual project ID

Troubleshooting

If you encounter issues during integration, see the Troubleshooting Guide for common problems and solutions across all platforms.