DEV Community

Sarmad Hussain
Sarmad Hussain

Posted on

Check redirect chains free: how to inspect 301/302 redirects before launch

Redirects are easy to ignore until a launch goes wrong.

A page may look fine in the browser, but the request path can still have problems:

  • http redirects to https
  • non-www redirects to www, or the other way around
  • old URLs redirect to new slugs
  • tracking links add another hop
  • a CMS or proxy adds one more redirect without anyone noticing

One redirect is normal. A long chain is where problems start.

Why redirect chains matter

Every redirect adds a request before the visitor reaches the final page. That can slow down crawlers, make analytics harder to read, and hide mistakes that only appear after deployment.

Common examples:

http://example.com/page
-> https://example.com/page
-> https://www.example.com/page
-> https://www.example.com/new-page
Enter fullscreen mode Exit fullscreen mode

That page works, but it takes three hops to reach the final URL.

What to check before launch

Before shipping a site migration, landing page, or SEO update, check:

  1. Does the URL end at the page you expect?
  2. Are there more redirects than necessary?
  3. Are redirects using the right status code?
  4. Is there a redirect loop?
  5. Does the final URL return 200?
  6. Are http, https, www, and non-www variants consistent?

301 vs 302 in plain terms

Use 301 when the move is permanent. This is the usual choice for old pages, changed slugs, and canonical domain redirects.

Use 302 when the move is temporary. This is useful for short campaigns, experiments, or temporary routing.

The important thing is consistency. A permanent URL migration that accidentally uses temporary redirects can create confusion for crawlers and reporting.

A simple redirect audit workflow

Pick the important URLs first:

  • homepage
  • top landing pages
  • pages with backlinks
  • old URLs from the previous site
  • paid campaign URLs
  • sitemap URLs
  • links used in email or social campaigns

Then inspect each URL and record:

  • starting URL
  • every hop
  • status code for each hop
  • final URL
  • final status code

If the final URL is correct and the chain is short, the redirect is probably fine. If there are multiple hops, loops, or unexpected destinations, fix the redirect rules before launch.

Free browser tool

I made a browser-based redirect checker inside I.T & All:

https://itnall.com/tools/redirect-checker?utm_source=devto&utm_medium=article&utm_campaign=redirect-checker

It is useful when you want to check a URL quickly without opening terminal tools or browser devtools.

When terminal tools are better

If you are checking redirects inside CI or auditing hundreds of URLs, use command-line tools or a crawler. For one-off checks, launch QA, and quick debugging, a browser-based checker is usually faster.

Final checklist

Before launch:

  • Keep redirect chains short.
  • Prefer one canonical domain.
  • Use 301 for permanent moves.
  • Use 302 only for temporary moves.
  • Make sure the final page returns 200.
  • Recheck after deployment, not only locally.

Small redirect mistakes are easy to miss, but they are much easier to fix before search engines and users start hitting the new URLs.

Top comments (0)