What Are Redirects?
Redirects send users from one URL to another.
When to Use Redirects:
- We move the URL of a webpage (from URL A to URL B);
- We delete a webpage;
- We move our website to a new domain name;
- We are performing maintenance on a webpage;
- We merge two or more duplicate webpages;
- We migrate website from HTTP to HTTPS, from WWW to non-WWW.
Why Are Redirects Important?
- Forward traffic from one URL to another when the old URL no longer exists;
- Forward authority when backlinks point to a page that has been moved;
- Improve UX by ensuring visitors don’t land on broken or duplicated pages.
Categories of Redirects:
There are two main categories of redirects: permanent and temporary.
We use permanent redirects when we don’t expect to display the old webpage again. Like if we delete a webpage. Or if we combine duplicate pages. Permanent redirects tell search engines to remove the old URL from search results and start displaying the new one.
Temporary redirects are for when we need to redirect a page for a short time. For example, when we’re performing website maintenance. We could temporarily redirect users to a message telling them to check back after maintenance is complete. With a temporary redirect search engines will usually keep the old URL in its index for longer than it would for a permanent redirect.
Types of Redirects:
HTTP Redirects
In technical terms, these are called server-side redirects. The user’s browser requests the old URL. The server automatically displays the webpage for the new URL.
It does that by responding with a 3xx HTTP code when it receives the request for the redirected URL. Those 3xx codes are like instructions for a browser. They indicate that the requested URL has been redirected. And where to find the new webpage.
In practice, we usually use only the following 3xx server responses:
301 Redirects (Moved Permanently). 301 redirects signal to search engines that the move is permanent. They’re also considered the best way to pass link equity if you need to redirect a page. But keep in mind that page authority diminishes with each 301. So only use them when necessary.
302 Redirects (Found & Moved Temporarily). A 302 redirect tells search engines that a redirect is temporary. We use a 302 redirect when: we temporarily move a webpage to a new URL, a page is under maintenance, or when we want to A/B test new website design or text.
There are other types of HTTP redirects, 303 is for example, that sends users to another relevant page when the old one is not available (most often when users have already submitted a form and cannot resubmit). But within the framework of SEO tasks, we rarely intersect with them, and I am not touched on them in this article.
Meta Refresh Redirects
Meta refreshes happen at the page level (client-side) rather than the server level. That means they happen in your browser rather than on a server. I touch on it simply in nominal order, but I highly do not recommend using this type of redirect, and we do not need it at all. This type of redirects only confuse any search engine, and they are very slow. We pass by in general.
They look like this:
<meta http-equiv=”refresh” content=”0; url=https://olegdigital.com/”> search engines interpret this as permanent redirect, or
<meta http-equiv=”refresh” content=”5; url=https://olegdigital.com/”> search engines interprets this as temporary redirect.
JavaScript Redirects
JavaScript redirects also happen on the client side rather than the server side. And like meta refresh redirects, I am not recommended them for SEO. This is because search engines may not index webpages correctly when redirecting using JavaScript. And that could hurt a website’s rankings in search results.
Here’s an example of a JavaScript redirect in HTML code:
window.location.replace(“https://olegdigital.com”);
How to Implement Redirects
- Through plugins for WordPress sites;
- Through CMS (content management system). Wix, Webflow and other website builders have this feature;
- Through an .htaccess file.
Redirect FAQs
- We can apply a redirect to a single URL. Or to a group of URLs.
- We can redirect an entire domain to another domain name.
- Avoid redirect chains and loops. A redirect chain is when more than one URL redirect exists between the original URL and the final URL. A redirect loop occurs when a URL redirects to another URL. And that second URL redirects back to the original URL. This creates an infinite circle of redirects.
- Avoid linking to pages with redirects.
- We should keep permanent redirects in place for at least a year. Ideally, indefinitely.
- When we set up a redirect, we make sure that the new page’s content is a close match to the old page’s. I do not advise making redirects to pages with calls to buy crypto and sports betting. 🙂