Why 301 redirect is important if you are upgrading your website

Why 301 redirect is important if you are upgrading your website

One of the essential SEO basics is having a clear understanding of 301 redirects. If you are an SEO professional, you would have clear experience on how simple it seems initially, but understanding how redirects can be implemented can get complex based on the specific scenario. The sooner you master it, the better.

The below are a few scenarios when 301 redirects would come in handy:

  • When there is a broken URL
  • When a page has been moved to a new location
  • When updating an existing domain name
  • When deleting a page

If you want assistance with redirects, reach out to our team at the Seattle SEO agency. At Seattle New Media, we provide professional SEO services in Seattle and across the globe.

Unless you are an expert at redirects, you could end up messing up and negatively affecting your SEO and user experience. It is really important to have a clear understanding of what a 301 redirect is.

You might remove web pages, change URLs for multiple reasons, including discontinuation of products (that are deleted) or URLs with dates being updated. Mostly, these happen under unavoidable circumstances; however, the deletion of products that are no longer available isn’t a great idea.

If you are simply thinking of updating or deleting a specific page without implementing redirects or taking any other measure, undoubtedly, you would end up running into problems. Implement a redirect to prevent any visits happening to that specific page, which would lead to a dead end on your site. When it comes to implementing a redirect in such cases, it should be always a 301 redirect.

What is a 301 redirect?

An illustration of how this might look:

For example, imagine that you have historically hosted your blog on a subdomain called https://blog.newa.com. Later, you might want to move this to, say a subfolder, https://www.newa.com/blog/.

The original blog gets indexed by Google, bookmarked by visitors, and might be included in emails and social media posts. This would bring in a lot of traffic to the original site and no one wants to lose that. When a blog gets moved to the subfolder, you will have to delete the subdomain, which will take the users to a 404 page when they access the original URLs.

This practice is not recommended as it might result in a poor user experience. Moreover, it will lead the search engines into dropping the blog pages off their index as they are led into thinking that the page no longer exists.
However, using a 301 redirect, you can make sure that when someone visits the old URLs, they will be automatically redirected to the latest one, resulting in the search engines indexing the pages in the long run. This means you do not lose any traffic.

Your page rank stays the same. (A page rank is usually a number from 0 to 10 as assigned by Google to a website. This number implies your SEO’s overall quality for content. Page rank is an important aspect of Google’s algorithm, which gets updated a couple of times in a year.)

Let us now see how to set up 301 redirects

There is more than one way to set up 301 redirects. While some of the ways might be inclined toward developers, others are considered to be user-friendly.

301 redirects in .htaccess

One of the most common ways to implement redirects is via a .htaccess file – running on Apache servers. Here are some common .htaccess directives for redirection.

  1. Redirecting an entire domain to a new site
    Redirect 301 / http://www.website1.com/
    You can start by replacing the “website1” domain with the latest redirect destination; 301 redirecting every page on your site to the corresponding URL on the domain of your choice.
  2. Redirecting a single page
    Redirect 301 / existingpage/ http://www. Website1.com/updatedpage/
    This redirect can be used across various domains or even on your site.
  3. Implementing Apache mod_rewrite
    Implementing Apache mod_rewrite in your .htaccess file makes redirection more flexible. You can use the below code for redirecting from a non-www to a www subdomain.
    RewriteEngine on
    RewriteBase /
    rewritecond %{http_host} ^domain.com [nc]
    rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc]
  4. PHP Redirect
    You may implement a 301-redirect using PHP:
  5. JavaScript Redirects
    Usually, not a recommended practice for SEO purposes – you can technically implement redirects using JavaScript. In some researches, it has been found that Google is likely to interpret JavaScript redirects to be 301s; however, we still do not know how far that applies. As you might be familiar, JavaScript is usually executed client-side and not server-side, so there is no evidence on Google indexing the redirection as expected. Also, when using JavaScript for redirection, we do not have a way to declare an HTTP status code.Below example depicts the implementation of a JavaScript redirect (not a recommended practice for SEO):

Summary:

301 redirects are a recommended SEO practice in the following scenarios:

  • When a site has been moved to a new domain – ensuring traffic and SEO history gets routed to a new point.
  • When a URL for a page, product, post, etc., gets changed and to have your existing Page Rank transferred to the new URL. Once the URL is changed, reroute all the transfers from the old URL to the new one.
  • When merging two websites to ensure that links to outdated URLs are being redirected to the appropriate pages.

Would you like help with 301 redirects or would you like to check if you need to implement 301 redirects for your website? Our SEO expert in Seattle will assist you. Contact our team of SEO experts at Seattle New Media today.