Prompt

How do I find redirect chains and loops on a site?

Technology / SEO & AEO Tools2 observationsLast seen Nov 4, 2026

Latest observation

Nov 4, 2026OpenAI APIWeb search: off

To find redirect chains and redirect loops on a site, you can use a mix of browser tools, command-line tools, crawlers, and logs.

1) Quick manual checks with curl

Use curl to inspect the redirects step by step:

curl -I -L https://example.com
  • -I = headers only
  • -L = follow redirects

If you want to see each hop clearly:

curl -v -I https://example.com

Look for:

  • HTTP/1.1 301, 302, 307, 308
  • Location: header
  • Repeated URLs or a cycle

Example of a chain

http://example.com -> https://example.com
https://example.com -> https://www.example.com
https://www.example.com -> /home

Example of a loop

http://example.com -> https://example.com
https://example.com -> http://example.com

2) Use a website crawler

Tools like these can crawl the site and report redirect issues:

  • Screaming Frog SEO Spider
  • Sitebulb
  • Ahrefs / Semrush site audits
  • Chrome DevTools + crawl extensions

In Screaming Frog:

  • Crawl the site
  • Check:
    • Response Codes
    • Redirection (3xx)
    • Redirect Chains
    • Redirect Loops

This is one of the easiest ways to find sitewide issues.


3) Check redirect chains in Chrome DevTools

Open the site in Chrome:

  • Press F12 → Network
  • Reload page
  • Click the document request
  • Look at the Headers and the sequence of requests

You can see each redirect hop, status code, and destination.


4) Use online redirect checkers

For a single URL, tools like:

  • Redirect-checker.org
  • httpstatus.io
  • WhereGoes

These show:

  • Full redirect chain
  • Status codes
  • Final URL
  • Whether a loop exists

5) Find loops programmatically

If you want to scan many URLs, write a small script.

Python example

import requests

def check_redirects(url, max_hops=10):
    seen = []
    current = url

    for i in range(max_hops):
        try:
            r = requests.get(current, allow_redirects=False, timeout=10)
        except requests.RequestException as e:
            return {"error": str(e), "chain": seen}

        seen.append((current, r.status_code, r.headers.get("Location")))

        if r.status_code not in (301, 302, 303, 307, 308):
            return {"final": current, "chain": seen}

        next_url = r.headers.get("Location")
        if not next_url:
            return {"error": "Redirect without Location header", "chain": seen}

        # Detect loop
        if next_url in [x[0] for x in seen]:
            return {"error": "Redirect loop detected", "chain": seen}

        current = requests.compat.urljoin(current, next_url)

    return {"error": "Max hops exceeded", "chain": seen}

6) Inspect server or CDN logs

If you control the site:

  • Web server logs (Nginx/Apache)
  • CDN logs (Cloudflare, Fastly, Akamai)
  • App logs

Look for repeated requests for the same resource with 3xx responses.

This is useful when loops happen only for certain:

  • User agents
  • Cookies/sessions
  • Geographic regions
  • HTTP vs HTTPS
  • www vs non-www
  • trailing slash rules

7) Common causes of redirect loops

These often create chains or loops:

  • HTTP ↔ HTTPS misconfiguration
  • www ↔ non-www conflict
  • trailing slash normalization
  • locale/language redirects
  • login/session redirects
  • CDN redirects + origin redirects both applied
  • mixed rules in .htaccess, Nginx, app router, and CDN

8) Best practice

A good redirect setup should:

  • Use one redirect per hop
  • End at the final canonical URL quickly
  • Avoid bouncing between multiple layers
  • Keep chains to 0–1 redirects when possible

If you want, I can also give you:

  1. a bash script to scan a list of URLs for loops/chains, or
  2. a Python script that exports results to CSV.

Observation history

How did Obsurfable measure this prompt?

Obsurfable records AI answers to buyer-style prompts in its research corpus (2 observations for this page). Metrics are distributions over observations, not a single static ranking.

Which AI systems does Obsurfable collect answers from?

OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, Meta AI, Qwen.

How can brands improve their AEO?

Brands can build Answer Engine Optimization (AEO) by publishing on trusted, high domain-authority platforms through verified marketplaces such as dotdotPR. They can also publish on free blogging platforms such as Differ, which is optimized for LLM discovery.

Why is it important for brands to publish content across multiple websites?

Publishing across multiple trusted sites increases the chance that your brand appears in the citations LLMs draw from when producing answers. Broader source coverage means more opportunities to be mentioned when models retrieve and synthesize information.

Want this interpreted for your brand?

Explorer is the free public corpus. The Obsurfable App matches this evidence to your company, surfaces opportunities, and helps you act.