Have you ever wondered how you end up at a final destination URL even though it might not be the specific URL you clicked on? That, my friends, is what we call a “redirect.”

 

What is a URL Redirect?

A redirect is the action that occurs when you forward a user or a search engine bot to a different URL than was originally requested. Sometimes a redirect is as simple as navigating a user to a more relevant page on the same domain they requested, and other times its as complex as sending the user or bot to a completely different domain. The three most popular redirects are a 301, 302 and meta refresh.

 

URL Redirect Types

  • 301 Redirect  (Permanent Redirect)
  • 302 Redirect (Temporary Redirect)
  • 307 Redirect, the successor to 302 (Temporary Redirect)
  • Meta Refresh (On-Page Redirect)

 

301 Redirect – Moved Permanently

Firstly, the number “301” is just the HTTP response status code for “moved permanently,” one of those trusty old SEO glossary buzzwords. Tet status code tells search engine bots and web browsers that the content on the page requested has been permanently moved to another URL. This type of redirect is considered best-in-class from an SEO standpoint, because it preserves up to 99% of the link authority from the redirected page, transferring it to the new destination.

 

302 or 307 Redirect – Moved Temporarily

A 302 redirect is a temporary move that essentially tells the search engines that the destination URL will only exist for a moment, and that the original URL should likely stay indexed.

 

Meta Refresh

Contrary to the prior redirects, which are server side, a meta refresh is a page-level redirect. You’ll usually see them in situations where a website says “if you are not redirected in X seconds click here.” These redirects are not recommended to be used from an SEO standpoint, because it doesn’t necessarily offer the best user experience. 

 

When should I use a 301 vs 302 Redirect?

When should you use a 301 redirect vs a 302?  If you plan on permanently moving your page to a new destination, there is no question that you should use a 301 redirect. As stated previously, 301 redirects transfers anywhere from 90-99% of the link authority from the old page to the new page. So if you built strong links to the page you’d like to redirect, using a 301 redirect will preserve almost all of its strength. Google even outlines the usefulness of the 301 redirect in its Webmaster Guidelines stating, “If you need to change the URL of a page as it is shown in search engine results, we recommend that you use a server-side 301 redirect. This is the best way to ensure that users and search engines are directed to the correct page. The 301 status code means that a page has permanently moved to a new location.”

Counter to the 301 redirect, 302 and 307 redirects don’t pass link authority to the destination, since the redirect will not be permanent. This type of redirect should generally be avoided for SEO purposes, but can be used during maintenance periods or for very temporary periods. For example, if your original page isn’t displaying the right customer experience, but another similar page is, a temporary redirect would ensure that your users don’t incur a disjointed journey until the fix is in place.

 

How to Create Redirects

Alright, enough of the technical stuff, I’m sure you’re here to figure out, “How do I create a 301 redirect?” Well, there are a couple of different ways that you can create redirects, depending on your preference. You can either use a WordPress plugin, or  if your website is hosted on a server running Apache, you can make changes inside of your .htaccess file.

 

How to Create a 301 Redirect in WordPress Using Plugins

If editing your .htaccess file proves to be too difficult or burdensome, one of the simplest ways to create a 301 redirect is to use one of the many plugins inside of WordPress.

One of my favorite plugins that I personally use to create my redirects is Simple 301 Redirects. Another good plugin that’s an option is Redirection.

For this example we’ll use Simple 301 Redirects. Install it like you would any other WordPress plugin, then move over to your settings in the WP Dashboard. You’ll see an option titled “301 Redirects,”which you can click to get started.

Once you’re in the actual interface you’ll see that its incredibly easy to understand. There is a “request” and a “destination” section, and the plugin gives you examples of how what each looks like.

First, you’ll enter just the URL slug of the page you want to redirect in the “request” section.

After that, you’ll enter the full URL of the new page in the “Destination” section.

You can add as many redirects as necessary, but MAKE SURE you click the “Save Changes” button in the interface, otherwise your redirect will not be recorded.

 

How to Create a 301 Redirect Using .Htacess File (Advanced)

To find your .htaccess file, you’ll need to log in to your hosting account’s cpanel. The screenshots below are provided from Siteground, my preferred hosting platform.

While the UI itself looks different across hosting platforms, you can easily find it of you look for something called a “File Manager” inside of the cPanel.

You can implement 301 redirects through code changes to your .htaccess file, which is a text-based configuration file that controls the directories and subdirectories that sit on an Apache web server. This is only recommended if you are an advanced user, since editing the .htaccess file to add 301 redirects manually does come with some risk.

 

301 a single page URL to another

If you’re making a simple change from one page to another, entering the below snippet inside of your .htaccess file will satisfy that. You can enter as many of these redirect scripts as needed.

Example:

  Redirect 301 /old-page/ http://www.yourdomain.com/new-page/

 

301 an entire directory and all of its contents to another directory

If you’re changing your site’s architecture and renaming a directory, or even migrating a deprecated directory, you’ll want to move all of the old content over to the new relevant destination. Instead of 301 redirecting each page in the directory, the .htaccess script will allow you to move the entire directory to its new destination.

Example:

   RedirectMatch 301 ^/old-directory/ http://www.yourdomain.com/new-directory

301 an entire domain to another domain

RedirectMatch 301 ^(.*)$ http://www.yourdomain.com/

 

Domain Redirects

Redirects are not solely used for page-to-page transfers, they often can be used at the domain level. Instances like moving from HTTP to HTTPS, or executing a domain migration require 301 redirects to maintain SEO authority.

 

Takeaways

Redirection is an integral part of SEO that is often overlooked or left by the wayside, which can have negative consequences. Far too many successful businesses have seen their traffic plummet as a result of improperly using redirects or forgetting to use them at all. Make sure that you properly implement 301 (and 302) redirects when necessary to keep your sites authority and relevance at an optimal state.