Technology · August 17, 2023 · Liam Chen · 5 min
A URL redirect automatically sends a visitor from one web address to another. Here is how redirects work, the difference between permanent and temporary ones, and why websites rely on them.
You click a link, and the address in your browser changes to something different before the page even appears. You typed one web address and somehow arrived at another. That sleight of hand is a URL redirect, and it quietly keeps much of the web working.
Here is what a URL redirect is and why websites depend on them.
A URL redirect is an instruction that automatically forwards a visitor from one web address to a different one.
When you request a page that has a redirect in place, the server does not hand over that page. Instead it replies, in effect, "that has moved; go here instead," and your browser obediently fetches the new address. The whole exchange usually happens in a fraction of a second, which is why a redirect often passes unnoticed except for the changed address in the bar.
A web address, often called a URL, is the unique location of a page on the web. A redirect simply connects an old or alternative location to the real one, so requests end up in the right place.
Redirects are built into the language web servers use to respond to requests, the same system of HTTP status codes behind messages like the 404 error. When a redirect is set up, the server answers a request with a special code in the 3xx family, the group that means "redirection," along with the new address to go to.
The steps look like this:
Because the browser handles steps three and four instantly, the experience feels like a single, slightly slower page load. These exchanges travel over the same web protocols that carry everything else, including secure connections; for how the secure layer works, see what HTTPS is.
Not all redirects mean the same thing. The two you will hear about most are the 301 and the 302, and the difference matters.
The distinction is not just bookkeeping. Search engines treat the two differently. A 301 tells them to update their records and pass the old page's standing to the new address, while a 302 tells them to keep the original on file because it will be back. Using the wrong one can confuse search engines and harm a site's visibility.
The rule of thumb: use a 301 when the change is permanent, and a 302 only when you genuinely intend to bring the original page back.
Redirects are not an obscure technical nicety; they solve everyday problems that every growing website faces. Common uses include:
In each case the goal is the same: make sure visitors and links end up where the content actually lives, even after it has moved.
Redirects are helpful, but they can be misused, and a few pitfalls are worth knowing.
The most common problem is a redirect chain, where one address redirects to a second, which redirects to a third, and so on. Each hop adds a little delay and uses extra bandwidth, so a long chain slows the page and can frustrate both visitors and search engines. A close cousin is the redirect loop, where addresses point back and forth at each other endlessly; browsers detect this and give up with an error.
Another mistake is redirecting many unrelated old pages to a single, generic destination such as the homepage. Visitors expecting specific content land somewhere irrelevant, and search engines may treat the redirects as unhelpful. The better approach is to send each old page to its closest matching new page.
Used carefully, though, redirects are a clean and reliable tool. The fixes for the problems above are straightforward: keep chains short, point pages to relevant destinations, and review redirects periodically so they continue to make sense as a site evolves.
| Redirect | Meaning | Typical use |
|---|---|---|
| 301 | Permanent move | Reorganised or renamed pages, merged content |
| 302 | Temporary move | Maintenance pages, short-term promotions |
Choosing correctly between these two is most of what good redirect management involves.
A URL redirect automatically forwards a visitor from one web address to another, usually so quickly you barely notice. It works through HTTP redirection codes, with a 301 signalling a permanent move and a 302 a temporary one, a distinction that matters to both visitors and search engines.
Redirects keep old links working, prevent visitors from hitting a 404 when a page has moved, tidy up web addresses and ease rebrands and security upgrades. Their main pitfalls, long chains and irrelevant destinations, are easy to avoid. Far from a trick, the humble redirect is one of the quiet pieces of plumbing that keeps the web joined up as it constantly changes.