What Is a Redirect? A Plain-English Guide

A beginner-friendly explanation of what a redirect is, why websites use them, what happens behind the scenes, and what can go wrong when redirects are misconfigured.

A redirect is when one web address automatically sends you to a different web address. You click a link or type a URL, and instead of loading that page, your browser loads a different one. The whole thing happens in a fraction of a second. Most of the time, you do not even notice it happened.

That is the simple version. The rest of this guide explains how redirects work under the hood, why websites use them, and what goes wrong when they break.

How a redirect works

Every time you visit a website, your browser sends a request to a server. The server sends back a response. Normally that response contains the web page you asked for. With a redirect, the server sends back a special response that says: "The page you want is not here. Go to this other address instead."

Here is what that looks like at the technical level:

  1. Your browser asks for http://example.com/old-page
  2. The server responds with a status code (like 301 or 302) and a Location header pointing to the new address
  3. Your browser automatically follows that instruction and requests the new address
  4. The new address responds with the actual page content
HTTP/1.1 301 Moved Permanently
Location: https://example.com/new-page

That Location header is the key. It tells the browser where to go next. The browser handles the rest without any action from you.

For a full breakdown of the different status codes used in redirects, see HTTP Redirect Status Codes.

Why websites use redirects

Redirects are one of the most common operations on the web. Almost every website uses them in some form. Here are the main reasons.

Moving or renaming pages

Websites change over time. A blog post that lived at /blog/2024/my-post might move to /articles/my-post during a site redesign. Without a redirect, anyone who bookmarked the old URL or found it in a search engine would hit a dead end (a 404 "page not found" error). A redirect sends those visitors to the right place.

Changing domain names

When a company rebrands and moves from oldname.com to newname.com, every page on the old domain needs to redirect to the matching page on the new domain. This preserves all existing links, bookmarks, and search engine rankings. See our site migration redirect checklist for a walkthrough.

Switching from HTTP to HTTPS

When a website enables HTTPS (the secure, encrypted version of HTTP), it needs to redirect all the old http:// URLs to their https:// equivalents. This is probably the most common redirect on the internet. If you type http://google.com, you get redirected to https://www.google.com. That is a redirect doing its job. See HTTP to HTTPS Redirect Guide for details.

Cleaning up messy URLs

Websites often need to consolidate different versions of the same page. For example:

  • example.com and www.example.com should go to the same place
  • /about-us/ and /about-us (with and without trailing slash) should not be two separate pages
  • /products?category=shoes and /shoes might show the same content

Redirects solve this by picking one version as the "real" URL and sending all the others there.

Temporary routing

Sometimes a redirect is not permanent. A website might redirect users to a maintenance page while updates are happening, or send visitors to a seasonal landing page during a holiday sale. When the event is over, the redirect gets removed.

Permanent vs temporary redirects

Not all redirects are the same. The two main categories are permanent and temporary, and the difference matters.

Permanent redirects

A permanent redirect tells browsers and search engines: "This page has moved for good. Update your records." The old URL should no longer be used. The most common permanent redirect uses the 301 status code.

When Google sees a permanent redirect, it swaps the old URL for the new one in its search index and transfers all the ranking value (sometimes called "link equity") to the new address. Browsers may also cache the redirect so they do not need to check the server again next time.

Temporary redirects

A temporary redirect says: "This page is somewhere else right now, but it will be back." The old URL is still the official one. The most common temporary redirect uses the 302 status code.

Search engines handle temporary redirects differently. They keep the old URL in their index and do not transfer ranking signals to the new address. They expect the situation to change.

For the full comparison, see 301 vs 302 Redirects.

The full list

HTTP defines several redirect status codes, each with slightly different behavior: [1]

301 Moved Permanently   - Permanent move
302 Found               - Temporary move
303 See Other           - Redirect after form submission (always GET)
307 Temporary Redirect  - Temporary move, preserves request method
308 Permanent Redirect  - Permanent move, preserves request method

For everyday websites, 301 and 302 are the ones you will encounter most often. The others handle more specific situations. See Types of Redirects for a full breakdown.

What you experience as a user

Most of the time, a redirect is invisible. You click a link, and a page loads. You do not see the redirect happen because browsers follow them automatically.

But sometimes you can spot them:

  • The URL changes in your address bar. You click a link to oldsite.com/page and end up at newsite.com/page. That was a redirect.
  • The page takes slightly longer to load. Each redirect adds a small delay because the browser has to make an extra round trip to the server. One redirect is barely noticeable. A chain of three or four redirects can add up.
  • You see a brief flash of a blank page. On slow connections, you might see the browser's address bar update before the new page loads.

If a redirect is broken, you might see an error page, get stuck in an infinite loop (the browser eventually gives up and shows an error), or land on the wrong page entirely. See What Happens When Redirects Break for real examples.

What happens behind the scenes

Let us walk through a real scenario. You type http://example.com into your browser.

Request 1:

GET / HTTP/1.1
Host: example.com

The server wants all traffic on HTTPS, so it redirects:

HTTP/1.1 301 Moved Permanently
Location: https://example.com/

Request 2:

GET / HTTP/1.1
Host: example.com

Now the server also wants www in the URL:

HTTP/1.1 301 Moved Permanently
Location: https://www.example.com/

Request 3:

GET / HTTP/1.1
Host: www.example.com

Finally, the server responds with the actual page:

HTTP/1.1 200 OK
Content-Type: text/html
...

That was two redirects before the page loaded. This is called a redirect chain, and while two hops is fine, longer chains slow things down and can cause problems for search engines.

When redirects go wrong

Redirects are simple in concept but easy to misconfigure. Here are the most common problems.

Redirect loops

A redirect loop happens when URL A redirects to URL B, and URL B redirects back to URL A. The browser goes back and forth until it gives up and shows an error like "ERR_TOO_MANY_REDIRECTS." This usually happens when two redirect rules conflict with each other.

Redirect chains

A chain is when one redirect leads to another redirect, which leads to another. Each hop adds latency and increases the chance that something breaks along the way. One or two hops is normal. Five or six is a problem that should be fixed.

Wrong redirect type

Using a permanent redirect (301) when you meant temporary (302) can cause headaches. Browsers cache 301 redirects, sometimes aggressively. If you set up a 301 and then change your mind, users who cached the old redirect may keep going to the wrong place even after you fix the server.

Broken redirects

A redirect that points to a page that no longer exists is worse than no redirect at all. The user follows the redirect expecting to find content and hits a 404 instead. Any link equity that the redirect was supposed to preserve is lost.

Slow redirect chains

Every redirect adds a network round trip. On mobile connections, each round trip might take 100-300 milliseconds. A chain of four redirects could add a full second to your page load time before any content even starts loading.

How to check redirects

If you want to see what redirects a URL goes through, you have several options.

Browser developer tools. Open the Network tab in your browser's developer tools, visit the URL, and look for responses with 3xx status codes. You can see each hop, the status code, and the destination.

Command line. The curl command can show you redirect chains:

curl -I -L https://example.com/some-page

The -I flag fetches only headers, and -L follows redirects. You will see each response in the chain. For more detail, see How to Check Redirects with curl.

Online tools. Redirect tracing tools let you enter a URL and see every redirect in the chain, the status codes, the response headers, and the final destination.

For a broader look at redirect checking approaches, see our HTTP Redirect Guide.

Redirects are normal and necessary

Every website uses redirects. They are not a sign that something is wrong. Problems only occur when redirects are misconfigured (loops, chains, wrong status codes) or when they break over time as sites change. The goal is not to eliminate redirects but to make sure the ones you have are correct and efficient.

The bottom line

A redirect is a server instruction that sends browsers from one URL to another. Websites use them to handle moved pages, domain changes, HTTPS upgrades, and URL cleanup. Behind the scenes, the server sends a status code (like 301 or 302) with a Location header, and the browser follows it automatically. When redirects are set up correctly, they are invisible to users and preserve search engine rankings. When they go wrong, they cause slow page loads, error pages, and lost traffic. Understanding the basics puts you in a much better position to spot and fix problems when they happen.

References

  1. IETF, "RFC 9110 - HTTP Semantics, Section 15.4: Redirection 3xx," June 2022. https://httpwg.org/specs/rfc9110.html#status.3xx

Never miss a broken redirect

Trace redirect chains and detect issues before they affect your users and SEO. Free instant tracing.

Try Redirect Tracer