SEO Redirects: Everything You Need To Know (301, 302, and etc.)

Do you need to delete or merge a few pages on your website but are worried about the potential negative side effects to your site’s overall SEO health?

This is something URL redirects help with. When users try to visit a page you no longer want to give them access to, they’re redirected to a new page instead.

SEO redirects allow you to “remove” pages while keeping your search engine optimization efforts intact.

In this post, you will learn the different types of redirects and when to use each.

What is an SEO redirect?

An SEO redirect happens when you redirect users to a new URL when they try to visit the original URL.

what is an seo redirect

A URL, or unique resource locator, is a unique identifier that represents a web page’s location. It’s as unique as your home address.

When users visit a URL that no longer exists, your website’s server outputs what’s known as an HTTP response code.

The response code for broken links is 404. Users will land on a 404 error code page if the URL they’re trying to visit is broken, which means it no longer exists.

amazon 404 page

Broken links occur when you delete pages that you or other sites still link to.

An SEO redirect, also known as a URL redirect, allows you to prevent users from landing on 404 pages by redirecting them to a different URL instead.

Here are a few use case scenarios for URL redirects:

  • When you need to move a URL. For example, if you use categories in your permalink structure and decide to move a blog post to a new category, the post’s URL structure would change.
  • When you want to merge two web pages. You either use one of the original URLs or create a new URL. Either way, you don’t want users to land on one or both old URLs, so you need to redirect them.
  • When you want to delete a page. Again, deleting pages that have SEO value (internal links and backlinks) results in broken links.
  • When you want to change your entire site’s URL structure, such as removing categories from your permalink structure.
  • When you activate an SSL certificate and need to switch from HTTP to HTTPS.

Why are SEO redirects important?

404 pages aren’t good for user experience. While you can customize your 404 error code page to feature navigation links and a search box, your user may simply exit your site if the page they were trying to visit no longer exists.

A redirect keeps your user on your site by fulfilling their original request to view content they want or need on your website.

Redirects are also good for SEO because they maintain backlinks your old URL has acquired.

If an authoritative site gives you a backlink that links to URL A, that site may delete that backlink if URL A is no longer accessible on your website and returns a 404 error code instead.

However, if you redirect URL A to URL B, the authoritative site will be more likely to keep your backlink.

Plus, search engines will be able to crawl and index URL B even though URL A no longer exists or is no longer relevant.

Types of SEO redirects

SEO redirects can be separated into two categories: permanent redirects and temporary redirects.

Permanent redirects are meant to be used when you no longer want your visitor to be able to access the original URL.

Temporary redirects are meant to be used when you only want to make the URL inaccessible for a limited amount of time, such as when you need to perform maintenance on your site.

The type of redirect used determines what search engines do with it.

If the URL has a permanent redirect, search engines will understand that the original URL has been permanently moved.

If the URL has a temporary redirect, search engines will understand that the original URL has only been moved temporarily.

There are different types of ways of implementing redirects:

  • HTTP redirects – Server-side redirects that are deployed using HTTP response codes.
  • Meta refresh redirects – Client-side redirects that are deployed using redirect code inserted into a file’s <HEAD> section.
  • JavaScript redirects – Client-side redirects that are deployed using JavaScript redirect code inserted into a file’s <HEAD> section.

HTTP redirects are most popular, so let’s cover them first.

HTTP redirects

Permanent redirects

  • 301 – A 301 redirect is a common permanent redirect that redirects users to a new URL and signals to search engines that the original URL has been moved permanently.
  • 308 – A permanent redirect for a redirected page that has non-GET requests, such as a page with a form where POST requests are also used.

Temporary redirects

  • 302 – A simple redirect that redirects users to a new URL but tells search engines that the original URL has only been moved temporarily, such as redirecting users to a maintenance page instead of your homepage.
  • 307 – A temporary redirect for pages that have non-GET requests, such as pages with forms, which use POST requests.
  • 303 – A temporary redirect that is not cacheable. It tells search engines that the original URL has been moved temporarily but does not allow that URL to be cached. This type of redirect prevents users from resubmitting form submissions. 303 redirects aren’t important redirects for SEO, but they are important for preventing form abuse.

Special redirects

  • 300 – A manual redirect in which the user is presented multiple destination URLs as options and must choose which one to be redirected to themselves.
  • 304 – Redirects users to a locally cached copy of a page that was stale.

Meta refresh redirects

A meta refresh redirect is a client-side redirect, which means it uses the user’s browser, as opposed to a server-side redirect, which uses your website’s web server.

You insert the following redirect code into the <HEAD> section of the HTML resource you’d like to redirect users away from:

<meta http-equiv="refresh" content="0; url=https://example.com/new-page">

The “0” tells the browser to redirect the user after 0 seconds, meaning immediately.

Replace “example.com/new-page” with your new destination URL.

Meta refresh directs are treated as permanent unless the “0” is set to any other whole number. Set it to something else if you want the redirect to be treated as temporary:

<meta http-equiv="refresh" content="5; url=https://example.com/new-page">

JavaScript redirects

A JavaScript redirect can be deployed using the following code in an HTML file’s <HEAD> section:

<script>window.location.href = ‘https://example.com/’;</script>

Insert your new destination URL in place of “example.com”.

JavaScript redirects aren’t very popular, but they can be deployed when you detect a user browsing your site from a specific device type. A JavaScript redirect can forward them to a page that’s optimized for their device.

This type of redirect can also be used to redirect users to a new page after they log into your site.

Best practices for URL redirects

We recommend following these redirect rules for best results

  • Deploy SEO redirects in a way that’s easy for you to do and manage.
  • Create a custom 404 page for your site.
  • Use Google Search Console to monitor broken links.
  • Do not delete old or under-performing pages.
  • Only use permanent redirects for pages you want to delete.

Deploying SEO redirects in a way that’s easy for you to manage

You may not get a choice in how you deploy redirects depending on how you built your website. For example, in Squarespace, you need to open the URL Mappings section under the Advanced Settings in order to set up redirects.

Wix, Webflow and Shopify also have ways to set up redirects in each platform’s respective dashboard.

In Wix, go to your SEO Dashboard, and open the URL Redirect Manager tool under Tools and Settings.

In Webflow, go to Site Settings → Publishing → 301 Redirects.

In Shopify, go to Settings → Apps and Sales Channels → Online Store → Open Sales Channel → Navigation → View URL Redirects.

However, if you do have a choice, do it in the easiest way possible and in a way that’s easy to manage in case you need to make changes.

For self-hosted WordPress sites, this means using a plugin.

If you already use an SEO plugin, see if it offers URL redirects as a native feature. This is something SEOPress, All in One SEO, RankMath, SEO Framework, Squirrly SEO and Yoast offer natively.

Most of these plugins only allow you to set up simple 301 redirects that forward users from URL A to URL B. If you need to set up more advanced redirections, use the Redirection plugin instead.

If your web server uses Apache (Nginx doesn’t support htaccess files), you can set up redirects manually by inserting redirect code into your site’s htaccess file:

Redirect 301 /old-page.html /new-page.html

So, if your original URL is https://example.com/chicken-fingers and your new URL is https://example.com/chicken-tenders, your redirect code would look like this:

Redirect 301 /chicken-fingers.html /chicken-tenders.html

Over to you

Redirects can be a lifesaver if you’re changing the structure of your URLs on your website, or changing your SSL certificate from http to https.

You don’t want to lose all that traffic by leading them to a 404 error. But it can get messy if not managed properly.

Make sure you follow these best practices for URL redirects to ensure you get the best results. 

Related reading: