Blog / Growth

How important are redirects for my static site?

HTTP redirects are a crucial part of your SEO efforts. But with the power of static site generators and hosting platforms, like Netlify, it’s quite trivial to get started.

Photo by Jamie Street on Unsplash

When my grandad would’ve asked me: “Kid, what are http redirects?” I would answer:

“Imagine you’re trying to visit a website on the Internet, but the address has changed. Instead of getting an error message or a blank page, a redirect will automatically take you to this new address. Redirects are like virtual detours that take you to the right place, even if the original address you tried to visit no longer exists.”

For all the non-grandads out there:

A redirect is a process that occurs at the server level and involves sending an HTTP status code to the browser. There are several types of redirects, including 301 (permanent), 302 (temporary), and meta refresh, each with its own specific use case. In terms of SEO, it’s important to understand the difference between these redirects and use the appropriate one to ensure that search engines and users are taken to the correct page and that link equity is preserved.

When do you use a 301 redirect? And when a 302?

When should a 301 be used #

A 301 redirect indicates that a page has permanently moved to a new URL. It transfers 90-99% of link equity (ranking power) to the new URL, so it’s the preferred method for redirecting pages in most cases.

Some examples:

If two pages on a website have similar content and are merged into a single page, the old pages should be redirected to the new page using a 301 redirect. This tells search engines that the old pages have been consolidated and the new page should be indexed in their place.

Or when changing the URL (usually just the slug) for a specific page, set up a 301 redirect from the old page to the new page.

When purging pages or changing slugs, be sure the sitemap is updated as well. Often automatic when using a Static Site Generator.

When to use a 302 #

A 302 redirect indicates that a page is temporarily moved to a new URL. It does not transfer any link equity to the new URL, so it should only be used for temporary changes. 302 redirects are less common, so let’s go over some examples.

For maintenance or updates, a 302 redirect can be used to temporarily redirect users to a maintenance page. Another common use case is when a certain product or service is temporarily unavailable. Instead of a 404 or “unavailable” message, 302 redirect to a similar product or service.

So in summary: use a 301 redirect if the old page needs to be gone (from search rankings) forever. With a 301 the page is de-indexed from the SERPs. If you plan do bring the page back, use a 302.

Check out this blog to learn how to set up redirects with Netlify or this blog if you are using Vercel.

Written by July Forand


Get all Spinal content in your inbox

Every first Thursday of the month, we'll send the latest about Spinal in your inbox. From product updates, articles and a little peek behind the scene of building a SaaS in 2023.

Get all the latest every first Thursday of the month. No spam. Unsubscribe at any time.