Summary

The technology world is full of jargon and acronyms and funny words. In this Tech Speak series, we try to explain these in simple terms as well as provide additional information if you want to go deeper.

Term: URL Redirect

AKA: Redirect, URL Redirection, HTTP Redirect, URL Forwarding

Oneliner: URL redirects help you reach the right destination on a website by automatically redirecting you from one web page or URL to another.

Short description: A URL redirect is similar to how mail forwarding works. If you move, you tell the post office where to redirect your mail. Similarly, a URL redirect allows visitors to be redirected from an old URL to a new URL. This can be helpful, for example, if someone has bookmarked the old URL, so they end up at the right place when they use their bookmark.

Example use case: Say you love the band U2 and you’ve bookmarked the U2 tour page (u2.com/tour) and check it from time to time. Then the website developers for the U2 site do a beautiful redesign of the website and the tour page is now at u2.com/tours. The developers knew what they were doing, so the added a URL redirect on the website from u2.com/tour to u2.com/tours. When you check for upcoming tours using your bookmark, it still works because it automatically redirects you from the old URL (u2.com/tour) to the new URL (u2.com/tours). If the redirect is fast enough, you might not even notice it happened.

Example standalone URL redirection services: BitlyBl.ink, Rebrandly, TinyURL

Keep in mind: A website doesn't need to use URL redirects, but they enhance the visitor's experience if URLs have changed. They are also a critical part of search engine optimization (SEO) and you might hurt your website rankings if you don't use them or use them incorrectly.

Why would a website want to use URL redirects?

URL redirection can be helpful for a number of reasons:

Domain change: If your website changes domain names, it’s critical to set up proper redirects from the old domain to the new domain so users can still navigate to the website easily and search engine rankings aren’t impacted*.

Website redesign: Websites are redesigned a lot. As part of site redesigns, it’s pretty common for some pages to get new URLs. All of web pages with new URLs should get URL redirects so bookmarks to the old URLs still work and people arriving on the site through search engines get to the right place.

Content restructure: Moving and consolidating content can happen as part of a website redesign or as a standalone project. After a content audit, the content team may find duplicate or outdated content or design a new way to present the content that’s more engaging. It’s important that the content audit has both the new and old URLs defined so URL redirects can be created for each one.

Marketing links: For marketing promotion, such as brochures, physical conference banners, or social media, it can be helpful to have short URLs that don’t take up a lot of space and look nicer. In this usage, you aren’t going from an old URL to a new URL. Instead, you are just using a shortened URL for ease of use.

Usage tracking: Websites often track traffic and want to understand patterns and high-usage pages. Also, for marketing campaigns, the content team may create slightly different internet ads for the same product or service. Different URLs can be used for each campaign ad so that it’s easy to track which ad is more successful.

A/B testing: Similar to campaign ads, content editors sometimes make different versions of a web page in order to see which page is more engaging. This might be two variations or a number of variations. When a visitor goes to a URL, they are temporarily redirected to one of the variations. Once the content team determines which variation is best, they turn off A/B testing and just use the winning web page.

* SEO impact from URL redirects depends on the type of redirect used. Check out How Redirecting URLs Can Impact SEO by Search Engine Journal.

How do URL redirects work?

When you create a URL redirect, you specify the "source URL", the "destination URL", and the "HTTP status code". The source URL is just the starting URL that the user clicks or types in. The destination URL is where they will end up after the redirect. The HTTP status code indicates if it’s a permanent or temporary redirect.

There are different ways that URL redirects work under the hood. Here is an example of a redirect process:

  1. The user types a URL into their browser, clicks a link in search results, or uses a bookmark. This is the “source URL”.
  2. The browser requests the content for that URL from the website.
  3. Since there is a redirect for that URL, the website responds with a redirect status code (e.g. 301 for permanent redirects, 302 for temporary redirects, etc.) which lets the browser know the web page URL has changed.
  4. Along with this status code, the web server also sends the new URL to the browser. This is the “destination URL”.
  5. The browser now requests the content for the new URL from the website.
  6. The user sees the web page with the new URL in the browser. If the redirect is fast enough, they might not even know the redirection happened.

Are there different types of URL redirects?

Not all URL redirects are implemented the same way. You can have “client-side redirects” and “server-side redirects”. And, you can use different redirect status codes depending on the redirect’s purpose.

Client-side vs server-side redirects

Server-side redirects are the most common. The user goes to a particular URL, the server indicates the URL has changed, and the browser uses this information to go to the new URL and show the right content. Server-side redirects are often faster and better for SEO if implemented correctly.

Client-side redirects happen in the browser. The user goes to a particular URL and gets the web page from the web server. Inside that web page, there is JavaScript or metadata in the content that causes the redirect to happen. You may have seen these before, for example, as a transition page where the web page says it will be redirecting you to somewhere else (often an external website). Client-side redirects are often slower and may be blocked in your browser by certain settings or extensions. Also, these types of redirects aren’t as good for SEO.

Redirect status codes

URL redirects have HTTP status codes associated with them. This helps the browser and search engines understand the purpose of the redirect. The most common redirect status codes are 301 Moved Permanently and 302 Found / Moved Temporarily.

The “301 Moved Permanently” redirect status code should be used when the URL of your web page changes or you have a shortened link. If you’ve merged two or more pages into one, you can use a 301 redirect for all of the old URLs. 301 redirects are also needed when a domain name changes or from redirecting from HTTP to HTTPS versions of your website. This option is the best for SEO if the change is meant to be permanent.

The “302 Found” (previously known as “302 Moved Temporarily”) status code is meant only for temporary redirection. This might be needed if you have to take down a particular web page or even an entire website for whatever reason and you want to temporarily redirect to a new location until the page or site are back up. 302 redirects are also used for A/B testing for variations of the same web page. While 302 redirects are common, they aren’t as common as 301 redirects.

URL redirection resources

Learn more about URL redirection and related concepts by checking out these resources:

About QuantCDN

Quant is a global static edge; a CDN combined with static web hosting. We provide solutions to help make WordPress and Drupal sites static, as well as support for all popular static site generators.