Categories
SEO

A Complete Guide of the Best Practices for URL Redirects

A redirect tells search engines and users to a different URL from the one they originally asked for. They are necessary when making changes to a website’s URL structure, or when moving content from one domain to another. You can use them to associate common web conventions (http://, www., and so on) with one another to help maximize domain authority.

When implemented correctly, little to no ranking is lost, but if not done right, a website can lose most of, if not all, its clout with Google and other search engines. This guide explains the types of redirects and how to implement them.

 

301: Moved Permanently: Best Choice for SEO

A 301 redirect permanently redirects from one URL to another. It passes 90% to 99% of the link juice, or ranking power, to the redirected page. 301 is the HTTP status code for this kind of redirect. Most of the time, this is the best kind of redirect for a website, since it helps keep all current SEO ranking in place.

The 301 tells browsers and search engine crawlers that the page has changed location, and the content, or at least an updated version of it, can be found at the new URL. This allows all link weight from the original page to the new URL.

Transferring content will become more complex if you choose to change your site’s domain, or move content from one domain to another. As a result of spammer abuse, if you’re using 301 redirects between domains, it takes more time for them to be implemented.

 

302: Found/Moved Temporarily

In HTTP 1.1, this is known as 302 Found, and in HTTP 1.0 it was known as 302 Moved Temporarily. Though some Google employees say there are instances where both redirects are treated in a similar manner, Moz says the best way to ensure you maintain all your SEO credit is by using a 301.

 

307: Moved Temporarily

In HTTP 1.1, the 307 code comes into play for Moved Temporarily.  While most crawlers treat it like a 302 in many situations, it is almost always best to continue to use the 301 redirect. The only situation where you should use the 307 redirect is when you really have only moved the content temporarily, such as when your website is undergoing maintenance, and the server has been identified as HTTP 1.1 compatible. It’s fairly difficult to determine whether or not the search engines can determine a page is compatible, so it’s best to use a 302 redirect on content that you’ve moved on a temporary basis.

 

Meta Refresh

A meta refresh is a type of redirect executed at the page level, rather than the server level. They are generally slower, and therefore not recommended for SEO purposes. They are most often associated with the “If you are not redirected within five seconds, click here” messages seen on many websites. A meta refresh will pass some link juice, but isn’t the best choice for SEO because you will lose a lot of link juice and because of poor usability.

 

Redirect Best Practices

Redirects have three core parts: the source, the type, and the destination. The source is the page you don’t want your audience to see. The type refers to whether it’s a 301, 302, or 307. The destination is the new page that you do want your audience to see.

When you move a site or a section of a site, implement 301 redirects on a one to one content basis. If you have three URLS, A, B, and C, A should have a redirect to A’s new location; B should have a redirect to B’s new location, and C should have a redirect to C’s new location.

Make sure you double check and triple check your robots.txt file to make sure you’re not blocking the redirecting URLs.

Remember, each redirect adds another request to your browser, meaning it will take additional time for your website to load. Don’t chain a lot of 301 redirects together – pointing one old URL to another old URL to another old URL before getting to the new one. If the chain gets too long, search engine bots won’t even follow it. You want a website that loads quickly and easily, both for user experience and search ranking purposes, and redirects are one of many factors that affect website speed.

Use the rel=canonical tag to indicate to search engines that what they see is not the official version of the page. This is ideal when you want people to be able to see and access both versions of a page, but only one version accessible and visible to search engines. This is the best way to address multiple versions of a page or piece of content – such as when you have a print version of an article, or you have multiple products that can fit into a single color category. You’ll want to do this for any content you’ve released for syndication on other blogs or websites, too. Don’t abuse the tag, however. Use it only when you want to avoid duplicate content issues.

 

Implementation Method 1: Editing Your Site’s .htaccess File (Apache Servers Only)

If your host allows access to your .htaccess file, open the file from your FTP program. The file is hidden by nature, so make sure your program is set to allow you to view hidden files.

Add a line in the file for each redirect. This tells the server what you want it to do. If you want to redirect a page use:

RedirectPermanent /old-file.html http://www.domain.com/new-file.html

If you want to redirect an entire domain, use:

RedirectPermanent / http://www.new-domain.com/

When you’re finished adding all your redirects, make sure there is a blank line at the end of the file. This is to tell the server you’re finished with the file, since it will read everything line by line.

 

Implementation Method 2: Using IIS (Windows Server Only)

If you’re using a Windows server and have access to the administrative tools, navigate to the Internet Information Services (IIS) Manager. Choose the site you want to work on from the panel on the left-hand side.

You’ll need to have the URL Rewrite module installed. If you do not, install it on your server first. Once installed, double click to open it.

On the right-hand side, click “Add Rules.” From there, choose “Blank Rule.” You should see it under the “Inbound Rules” section. Type a name for your rule.

Now, go to the Match URL panel. Set the requested URL to “Matches the Pattern” and “Using Regular Expressions.” Then, you’ll be able to tell the serve whether you are redirecting a single page, a group of pages, or your entire domain.

  • Page: Type the page name under Pattern.
  • A Group of Pages: directory/(.*)
  • Entire Site: (.*)

 

Make sure the “ignore case” option is checked.

Now, move to the “Action Panel” and select “Redirect.” In the “Action Properties” type in your new URL. If it’s a single page, type in the new address. If it’s a group of pages or entire domain, type your new destination with a back reference, {R:0}. That reference keeps all page URLs intact with the new domain. It would look like this: http://www.newdomain.com/{R:0}

If you want to keep using the tracking parameters you’ve had on the old URLs, check “Append Query String.”

In the “Redirect Type” field, choose “Permanent (301).”

In the Actions column at the top right, click “Apply” to save. At this point, your rules are saved into your web.config file, which you can edit as needed.

 

Implementation Method 3: Creating a 301 Redirect in WordPress

There are several plugins to help you get this done, if you’re not too much of a techy. If you’ve got the premium version of Yoast SEO, there’s a built-in feature to help you. It’ll even tell you if the redirect you’re about to make will create a redirect loop, which effectively shuts down your website. Otherwise, you can use Simple 301 Redirects.

 

Implementation Method 4: Placing Code at the Top of Each Page

If you can’t modify everything on your server and don’t want to use a plugin, but your pages use ASP, Java, PHP, or another language that allows you to make changes to the response headers, place code at the top of each page to do your permanent redirects.

If you’re brand new to the world of SEO, redirects can be intimidating. But with this guide, they don’t have to be. If you have any questions or need any help with 301 redirects as part of a site migration, let me know.

SEO virtuoso, CEO @Sachs Marketing Group. Focused on being of service to business owners - helping to better position them in the eyes of their audiences.

By Eric Sachs

SEO virtuoso, CEO @Sachs Marketing Group. Focused on being of service to business owners - helping to better position them in the eyes of their audiences.

Leave a Reply

Your email address will not be published. Required fields are marked *

Exit mobile version