This app runs inside the BotSurf browser. Don't have it yet? Get the app or extension now!

Universal Link Redirect Counter

Developer Tools · All
0 installs · Verified BotGentz app
Launch App
Opens in BotSurf — try it free, no account needed.
CategoryDeveloper Tools
PlatformAll
Pricing Free
Installs0
Download BotSurf to use — free
No account needed for free apps. Once BotSurf is open, find this app in Apps from the + menu.

About this app

WHAT IT DOES

This script scans every link on a webpage and follows each redirect chain using HEAD requests—counting how many redirects each link goes through before reaching its final destination. The panel displays a summary with total links, zero-redirect links, one-redirect links, and links with 2+ redirects. Each link is shown with its redirect count, final destination URL, and HTTP status code. Links with more than 3 redirects are highlighted in red as they may indicate performance issues or broken chains. Hover over any link on the page to see a badge showing its redirect count (e.g., "↻ 2" or "✓ Direct"). Click the copy button next to any link to copy its full redirect chain as text for debugging. Sort the list by redirect count (high-to-low or low-to-high), URL, or domain.

WHERE IT RUNS

Works on any webpage—site audits, link-checking tools, marketing dashboards, documentation sites, or any page with links. The script uses HEAD requests to check redirects without actually loading the destination pages, making it fast and efficient.

HOW TO USE

The panel appears automatically when you visit a page. The "Scan Links" button runs the analysis—the script finds all anchor tags, resolves relative URLs, and follows each link's redirect chain. The summary shows at-a-glance statistics: total links, zero redirects (direct), one redirect, and two or more redirects. The detailed list displays each link with a color-coded border (green = 0 redirects, yellow = 1, orange = 2-3, red = 4+). Click the 📋 button next to any link to copy its redirect chain as formatted text including original URL, final URL, all intermediate steps, and status codes. Use the sort dropdown to reorder the list by redirect count, URL, or domain. Toggle "Show hover badge" to enable badges that appear when you mouse over any link on the page, showing its redirect count. Clear the cache at any time to force fresh redirect checks.

TECHNICAL MECHANISM: HEAD REQUEST REDIRECT CHAIN FOLLOWING WITH CACHING

The script uses a recursive GM_xmlhttpRequest strategy with followRedirect: false to manually control redirect handling. For each link, it sends a HEAD request to the current URL and inspects the response status code. If the status is in the 3xx range (300-399), it extracts the Location header, resolves it against the current URL (handling relative paths), increments the redirect counter, and recursively follows the new URL. This process continues until a non-3xx status code is returned, a max redirect limit is reached (default 10), or a timeout/error occurs. Each step in the chain stores the URL and status code for detailed reporting. The script uses concurrency limiting (4 parallel requests) to avoid overwhelming the server and respects browser throttling. All results are cached using GM_setValue per domain to avoid repeated checks on the same URL—the cache is keyed by the full URL and stores the redirect count, final URL, status code, and full chain. The cache is limited to 300 entries to prevent storage bloat. The script also tracks the original element for each link, enabling hover badge functionality via mouseenter/mouseleave events that create positioned badges with the redirect count.

THE PANEL

The redirect counter appears in a draggable, resizable panel that remembers its position per site. The summary grid shows four key metrics at a glance, and the detailed list supports scrolling for large numbers of links. Drag by the header to reposition, collapse to a compact icon with a click, and resize using the bottom-right corner. The panel snaps to screen edges for tidy placement and closes with the Escape key. All settings—sort order, hover badge toggle, and panel position—persist per website using GM_setValue, so your view returns exactly as you left it.

PLEASE NOTE

This script requires the free BotGentz extension to run. The script sends HEAD requests to every link on the page, which may be rate-limited by some servers. Use responsibly on large pages. The cache stores redirect results locally in your browser; clearing the cache forces fresh requests. Links with redirects exceeding the 10-hop limit are marked as errors. Hover badges are positioned dynamically to avoid overflow off-screen. The script does not load full page content for expanded URLs—only headers are fetched, making it privacy-friendly and bandwidth-efficient.

Similar Apps

Log in to BotGentz

Suggest an App

Tell us what you'd find useful — if we build it, we'll email you the moment it's ready.