[Crawl-Date: 2026-04-15]
[Source: DataJelly Visibility Layer]
[URL: https://datajelly.com/blog/how-we-built-redirects]
---
title: How We Built DataJelly Redirects | Blog | DataJelly
description: A technical deep dive into building a full redirect system — spanning edge networking, transport-level validation, SEO auditing, management tooling, and documentation.
url: https://datajelly.com/blog/how-we-built-redirects
canonical: https://datajelly.com/blog/how-we-built-redirects
og_title: DataJelly - The Visibility Layer for Modern Apps
og_description: Rich social previews for Slack &amp; Twitter. AI-readable content for ChatGPT &amp; Perplexity. Zero-code setup.
og_image: https://datajelly.com/datajelly-og-image.png
twitter_card: summary_large_image
twitter_image: https://datajelly.com/datajelly-og-image.png
---

# How We Built DataJelly Redirects | Blog | DataJelly
> A technical deep dive into building a full redirect system — spanning edge networking, transport-level validation, SEO auditing, management tooling, and documentation.

---

When we started building redirect support in DataJelly, we thought it would be simple. *"Just return a 301 and call it done."* That assumption lasted about a day.

What we actually ended up building was a full redirect system — spanning edge networking, transport-level validation, SEO auditing, management tooling, and documentation. This post breaks down how we built it, step by step.

## The Problem: Redirects Are Simple… Until They Aren't

Redirects sit at the intersection of networking (HTTP behavior), infrastructure (CDNs, proxies, DNS), SEO (Google expectations), and application logic (routing). Most platforms treat redirects as a config file or an afterthought.

But for DataJelly, redirects had to work **at the edge**, for **bots and humans**, with **zero origin changes**, and be **verifiable and testable**. That last part turned out to be the hardest.

## Step 1: Research — What "Correct" Actually Means

Before writing code, we had to answer: *What is a "correct" redirect?* We validated behavior across Googlebot expectations, browser handling, common SEO tools (Ahrefs, Screaming Frog), and platform behavior (Vercel, Netlify, Cloudflare).
## Key Findings

- 301 vs 302 matters less than correctness
- Redirect chains are bad (performance + SEO)
- Loops must be prevented
- Query strings must be preserved
- Trailing slash normalization is critical

Most importantly: if you don't emit a **real HTTP redirect**, SEO tools will not detect it. This forced us to commit to true HTTP redirects at the edge — not rewrites.
## Tech Stack (for this feature)
| Layer | Technology | Purpose |
| --- | --- | --- |
| Edge Routing | Node.js (Fastify) | Evaluate redirect rules and return HTTP 301 responses at the edge |
| Proxy / Transport | Node.js | Handle upstream requests, TLS/SNI, and fallback behavior |
| Data / Config | PostgreSQL | Store domain mappings and redirect rules |
| Cache Layer | Redis | Store snapshot and bot cache (used outside redirect path) |
| Frontend / UI | Lovable.dev | Dashboard for managing and importing redirect rules |
| Audit Tool | Node + Fetch | Crawl sites and detect redirects using manual HTTP handling |
## Step 2: Core System — Edge Redirect Engine

The foundation lives in our edge proxy. Every request flows through a redirect evaluation pipeline before reaching the origin.
![DataJelly edge redirect flow diagram showing request → edge evaluation → redirect or origin](https://datajelly.com/images/guides/redirect-edge-flow.png)
Browser / Bot

→ DataJelly Edge

→ Redirect Evaluation

→ Response

/flock1 → /flock2

301 Location: /flock2
## Why Edge Matters

Traditional redirects happen at the origin — requiring deploys, adding latency, and creating inconsistencies. DataJelly redirects execute at the edge: instant, centralized, and consistent for bots and users alike.

## Step 3: Transport Layer Testing (The Hard Lesson)

At first, everything looked correct. But our audit tool said: *"No redirects found."*

The issue: most HTTP clients (including `fetch`) automatically follow redirects. Instead of seeing `301 → /flock2`, we saw `200 → /flock2` — which made it look like no redirect happened.
## The Fix

fetch(url, { redirect: 'manual' })

Explicitly disabling redirect following exposed the real behavior: **301 → Location: /flock2**

Takeaway: Testing redirects requires transport-level control, not just HTTP requests. This became the foundation of our audit system.

## Step 4: Content Layer Testing — Building the SEO Audit Tool

Once we could detect redirects correctly, we built a crawler to answer: *"Are my redirects actually good?"*
## The Tool

- Crawls pages (sitemap + links)
- Detects all redirect responses
- Follows chains manually
- Tracks status codes, destinations, hop counts, and broken paths

/flock-chain1

→ /flock-chain2

→ /flock-final
**Hops:** 2 · **Type:** Chain

The redirect audit tool crawling a live site:
![DataJelly Site Redirects Audit tool showing crawl results with page-level redirects, domain-level redirects, chains, and broken paths](https://datajelly.com/images/blog/redirects-audit-tool.png) Click to enlarge

This turns redirects from *"configured"* into *"validated."*
### Try the Redirects Audit Tool

Crawl your site and validate every redirect — chains, loops, and broken paths.
[Run Audit](https://datajelly.com/seo-tools/redirects-audit)

## Step 5: Management Layer — The Dashboard

Once redirects worked and were testable, we built the management UI.
## Features

- Add/edit redirects with instant edge deployment
- Bulk import via CSV
- Validation: no loops, no duplicates, relative paths only

Design goal: simple enough for non-engineers, safe enough to prevent mistakes, fast enough to apply instantly.

The redirect management dashboard in action:
![DataJelly redirect management dashboard showing domain redirects with source paths, target paths, status codes, and active states](https://datajelly.com/images/blog/redirects-management-dashboard.png) Click to enlarge

## Step 6: Documentation — Making It Understandable

This is where most systems fail. We didn't just ship a feature — we built a guide system around it. The guide explains why redirects matter for SEO, common use cases, best practices, how DataJelly works, and how to test redirects.
## The Key Addition: Test Pages

We created a live testing environment where users can verify behavior instantly:

- `/flock1` → basic redirect
- `/flock-query` → query preservation
- `/flock-chain1` → multi-hop chain
- `/flock-loop1` → loop detection
### Read the Full Redirects Guide

Best practices, common mistakes, and how DataJelly handles redirects at the edge.
[View Guide](https://datajelly.com/guides/redirects)

## What We Ended Up With

This is what we thought we were building: *a redirect feature.*

This is what we actually built: **a full redirect system.**

Edge execution

Transport-level validation

SEO audit tooling

Management UI

Documentation + testing environment

## The Bigger Insight

Redirects are not just *"URL → URL"*. They are a core part of how search engines understand your site. If they're wrong, SEO suffers, crawlers get confused, and performance drops. If they're right, everything downstream improves.

## What's Next

We're now working on **Redirect Health Scoring**:

- Detect chains and loops automatically
- Flag bad patterns
- Provide actionable fixes

## Final Thought

"The biggest surprise building this feature was: redirects aren't hard — understanding and validating them is."

That's the gap DataJelly is closing.
## Are bots actually seeing your site?

Redirects are just one piece of the puzzle. Run a free visibility test to see how Google, Bing, and AI crawlers render your pages.
[Run Visibility Test](https://datajelly.com/)
## Related Reading

[Redirects Guide
Best practices and how DataJelly handles redirects](https://datajelly.com/guides/redirects) [Redirects Audit Tool
Crawl and validate every redirect on your site](https://datajelly.com/seo-tools/redirects-audit) [March Platform Update
Domain redirects, social previews, and more](https://datajelly.com/blog/march-platform-update)

## Structured Data (JSON-LD)
```json
{"@context":"https://schema.org","@type":"FAQPage","mainEntity":[{"@type":"Question","name":"Why do redirects need to happen at the edge?","acceptedAnswer":{"@type":"Answer","text":"Edge redirects are instant, require no origin hit, and behave consistently for both bots and users. Traditional origin-based redirects are slower, require deploys, and are harder to control centrally."}},{"@type":"Question","name":"Why do most HTTP clients miss redirect detection?","acceptedAnswer":{"@type":"Answer","text":"Most HTTP clients (including fetch) automatically follow redirects, so they see a 200 at the final destination instead of the original 301/302 response. You must use redirect: \u0027manual\u0027 mode to observe the actual redirect behavior."}},{"@type":"Question","name":"What is a redirect chain and why is it bad for SEO?","acceptedAnswer":{"@type":"Answer","text":"A redirect chain occurs when one redirect points to another redirect, creating multiple hops. This wastes crawl budget, slows page load, and can dilute link equity \u2014 all of which negatively impact SEO."}},{"@type":"Question","name":"How does DataJelly validate redirects for SEO correctness?","acceptedAnswer":{"@type":"Answer","text":"DataJelly\u0027s Redirects Audit tool crawls a site\u0027s pages, then checks each URL with transport-level HEAD requests that disable automatic redirect following. This exposes the real HTTP status codes, destination URLs, chain lengths, and broken paths."}},{"@type":"Question","name":"What is the difference between a 301 and 302 redirect?","acceptedAnswer":{"@type":"Answer","text":"A 301 is a permanent redirect, telling search engines to transfer all ranking signals to the new URL. A 302 is temporary, signaling that the original URL may return. For SEO, 301s are preferred for permanent URL changes."}}]}
```


## Discovery & Navigation
> Semantic links for AI agent traversal.

* [DataJelly Edge](https://datajelly.com/products/edge)
* [DataJelly Guard](https://datajelly.com/products/guard)
* [Pricing](https://datajelly.com/pricing)
* [SEO Tools](https://datajelly.com/seo-tools)
* [Visibility Test](https://datajelly.com/visibility-test)
* [Dashboard](https://dashboard.datajelly.com/)
* [Blog](https://datajelly.com/blog)
* [Guides](https://datajelly.com/guides)
* [Getting Started](https://datajelly.com/guides/getting-started)
* [Prerendering](https://datajelly.com/prerendering)
* [SPA SEO Guide](https://datajelly.com/guides/spa-seo)
* [About Us](https://datajelly.com/about)
* [Contact](https://datajelly.com/contact)
* [Terms of Service](https://datajelly.com/terms)
* [Privacy Policy](https://datajelly.com/privacy)
