301 redirects are so important.
If you don’t know how to handle them, your site will not be 100% for SEO.
Get a masterclass on 301 redirects below.
301 Redirects
But here’s the thing: when used correctly, 301 redirects can help you retain your authority and even boost your site traffic. Stay tuned and I’ll show you how.
What are 301 Redirects?
You’ve almost certainly experienced a 301 redirect – whether you knew it or not.
301 redirects happen behind the scenes. It’s a permanent redirect, meaning that anyone who types in an old URL will automatically be redirected to the right place.
In a nutshell, it’s the web’s forwarding system.
Technically speaking, a 301 redirect is an HTTP code that tells search engines the original URL has moved or been updated.
Take this site, for example.
The URLs are slightly different, but they send users to the same place. And when you arrive on the page, the URLs look the same. All due to a 301 redirect.
It’s an invaluable tool for SEOs and webmasters because it allows them to transfer URLs without losing hard earned link juice – that is, all the links pointing to your content – and keep your domain authority.
301 Redirects: SEO Old Rules vs. New
So far, 301 redirects are sounding pretty good.
But do be aware, 301 redirects come with some risk. There’s always the possibility that a redirect could cause a loss of traffic – and in the past, it often did. In fact, Google’s own Matt Cutts confirmed in 2013 that 301 redirects result in around a 15% loss of PageRank. Not only that, but a lot of concern surfaced around the move from HTTP to HTTPS (which we’ll cover shortly).
Naturally, that created some hesitancy on brand’s parts when it came to using redirects.
It seems like Google picked up on that, and in 2016 Google’s Gary Illyes stated that 30x (all 300 redirects) no longer affect PageRank.
Good news, yes. That being said, an unaffected PageRank score doesn’t mean you won’t lose any traffic. For example, a redirect could affect your page load speed, a known ranking factor.
And keep in mind, an ideal redirect means only the URL changes; everything else on the page – images, content, links – stay the same. If any of those elements change, it could potentially affect your rank.
Overall, I’ve found that it generally takes between 1 to 4 weeks for Google to pick up on the redirect. Following that, the rankings usually transfer in about a week.
Generally, the URL you are redirecting to ends up ranking in about the same position as the old URL.
In some cases a little higher, in others a little lower, in some cases something goofy happens and Google doesn’t pass the ranking or the ranking ends up much lower. There are many factors to consider here such as:
- Is the new URL SEO friendly?
- What is the content on the new URL?
- Are the links and rankings applicable for the new URL?
- Does the new URL have a penalty?
- Does the new URL have any links of its own?
- Etc.
The key takeaway here is this: yes, there are risks (though not as many as there used to be), but in most cases pages keep their rank.
Why Set up 301 Redirects?
301 redirects are used for a variety of reasons.
One of the biggest is what I outlined above with the Ignite site. By associating common variations with the same URL (think http.// or www.), you can maintain and maximize your domain authority.
They’re also used to rename or rebrand websites.
Say you own a business called Fresh Food to Go (freshfoodtogo.com), and have decided to change your name to Fresh Food Now (freshfoodnow.com).
You need to set up your new URL, but don’t want to lose your existing content or the links pointing to the original URL.
So you set up a 301 direct. Now, anyone who types in the old URL is automatically sent to the new site, and search engines will recognize the 301 and index it accordingly.
That’s a big win for SEO. The redirects preserve your links and authority while letting you focus on building a promoting a new brand.
301 Redirects for HTTPS Migration
Another major reason for 301 redirects is site migration.
It’s an especially relevant reason these days, as making the move to HTTPS is quickly becoming inevitable for most brands.
For reference: Google is all about HTTPS, and wants everyone to switch over. They’ve even gone so far as to include it as an official ranking factor.
In case you’re unfamiliar, HTTPS is the secure form of HTTP. When you visit a site that has migrated to HTTPS, you’ll see https:// in green with a padlock symbol next to the URL.
Naturally, Google wants its highest ranked sites to be secure. And if you think about it, most businesses would want that for their sites as well.
The easiest way to do it? Through 301 redirects.
That, however, proved to be a double-edged sword. Remember, redirects used to result in a 15% loss of PageRank.
Because a site migration involved so many 301 redirects, sites tended to lose major PageRank during the migration. As you can imagine, brands weren’t thrilled about that, and many simply put off the move in favor of keeping their existing traffic.
But once again Google came to the rescue, and in February 2016, Jon Mueller announced that 301 and 302 redirects would not lose any PageRank.
This is good news for multiple reasons. Not only does this remove the PageRank barrier of 301 redirects, but theoretically moving to HTTPS will give you a rankings boost while maintaining your already-established authority.
But as always, exercise caution and keep in mind that a migration could still have an adverse affect on your traffic.
The move to HTTPS is a complicated one, and takes time. And with a project as big as full domain move, there’s always the potential for something to go wrong.
To learn more about making a successful migration, check out my guide here.
How to Use 301 Redirects Through Apache
Fair warning: things are about to get technical.
Most redirects are made through Apache, but keep in mind that if you are using a CMS and are not a developer there are more user-friendly ways to do it.
For example, in WordPress if you change a post URL it automatically adds a redirect for you if this post already went live, this is of course in the latest version.
Also, again in WordPress you can use an easy plugin like Simple 301 Redirect that allows you to just copy and paste what you want done.
In the case of a CMS like Drupal, Magento, etc, there are also easy plugins you can use.
But back to Apache.
To perform a redirect in Apache, you’ll need to look in the root directory for .htaccess.
Using the 2 lines of code below in a plain-text editor, you’ll enable the Apache mod_rewrite module and enable the ReWriteEngine in the mod_rewrite module:
Options +FollowSymLinks
RewriteEngine on
Depending on the number of URLs, content, and domains you’d like to redirect, you’ll need to add in additional lines to the .htaccess file, which are as follows:
- Single Page URL
To permanently redirect a single page from one website to another use the basic code:
Redirect 301 /redirect page.html http://www.yourwebsite.com/newpage.html
- Directory URL and All Content
To redirect an entire directory, all URLs, and all content, use:
RedirectMatch 301 ^/olddirectoryname/ http://www.yourwebsite/newname
- Redirect New URL to Current Website
If you’ve recently purchased a new URL or have a new site that you’d like to redirect to your current website, you’re able to accomplish this using:
RedirectMatch 301 ^(.*)$ http://www.yoursite.com
- Redirect Old Website to New Website
An old website can be fully redirected to a new website, while keeping traffic and ranking, using:
RewriteCond %{HTTP_HOST} !^yournewdomain\.com
Rewrite Rule ^(.*)$ http://www.yournewdomain.com/$1 [R=301,L]
- Complicated 301 Redirects in Apache
In some instances, it may be necessary to perform a little bit more complicated redirects. For example, if you want to redirect multiple pages to a single page or need to redirect while changing the file name. If this is the case, the code will be a little more extensive, but you will still use the same opening attributes:
Options +FollowSymLinks
RewriteEngine on
- Redirecting Multiple Pages to One Page
Moving all of your link requests from an old site to one location, such as a new homepage, will require you to move the content on a page-by-page basis. Use the following code to perform this action:
Redirect 301 /oldsite1.htm http://www.yournewsite.com
Redirect 301 /oldsite2.htm http://www.yournewsite.com
Redirect 301 /oldsite3.htm http://www.yournewsite.com
Redirect 301 /oldsite4.htm http://www.yournewsite.com
- Changing Filename With a Redirect
You can use a php extension to redirect all of the old files from one account that end with html to one file on a new account. You can also use this method if you want to change all of your extensions without losing any incoming links from old pages with the following code:
RedirectMatch 301 (.*)\.html$ http://www.yoursite.com$1.php
- Redirecting CMS But Keeping Database
It is possible to change your site’s CMS while keeping your old database with a 301 redirect. To do this use:
RedirectMatch 301 /old cart.php(.*) http://www.yournewsite.com/newcart.php$1
Finally, upload the updated file to your root file. Don’t forget to test your new redirect to ensure they are working correctly. It’s also important to check using the HTTP Header viewer to ensure it shows the correct 301 redirect.
- CPanel Redirects
Some cPanels simplify the 301 redirect process. If this is the case, you’ll simply need to look for “Redirects” under Site Management while logged into your cPanel. In the first option, you’ll list your current directory. Then, add your new directory to the second box. Choose 301 for a permanent redirect, select to add the redirect, and you’re finished.
- PHP 4 and PHP 5 Redirects
You’re able to use a PHP redirect to permanently move a website or single page to a new site. These redirects will tell browsers and search engines that the page has been moved to a new location.
<?php
header(‘HTTP/1.1 301 Moved Permanently’)
header(‘Location: http://www.yournewsite.com/’)
- Active Server Pages
Active Server Pages (ASP) redirects will set the location header with the status code to be manually defined using:
<%
Response.Status-”301 Moved Permanently”
Response.AddHeader=‘Location’,”http://www.yournewsite.com/
What About Other Redirects?
301’s aren’t the only redirects in the game. So allow me to introduce you to its neighbor, 302.
301 Redirects
While a 301 signals a permanent redirect, a 302 signals a temporary redirect.
There are a few situations when a 302 would be preferable, such as updating a web page while still providing content to your readers.
But the vast majority of the time, you’ll want to stick with 301 redirects. They’re generally considered much better for SEO because they allow you to maintain your incoming links.
Though Google did state that no 300 redirects would lose PageRank, because a 302 is flagged as temporary the detour page may not receive not be treated the same – and could suffer in terms of domain authority and traffic.
301 Redirect Best Practices
301 Redirects
Now that we’ve done a little digging into how and why 301’s are used, let’s cover a few key factors to keep in mind when implementing.
- Always link related pages. Don’t link an old blog post to your contact page, or your old About Me page to the homepage. The more similar the new page is to the old, the more likely it is to keep its rank.
- The best kind of redirect for SEO is when everything on the page stays the same, except for the URL
- 301 redirects are the preferred method for SEO; use them in place of 300 directs when possible
- Set up a 301 redirect for possible web variations, such as http:// and http://www. to increase domain authority
- Set up a 301 redirect before moving to a new domain. If you move before the redirect is in place, you risk losing traffic.
- Google recommends keeping 301 redirects in place for at least a year.
- Clean up your 301’s periodically; If you collect too many that stay active too long, it could end up hurting your SEO
- Don’t redirect everything to the homepage. Remember, keep your linked pages relative and related
Wrapping Up 301 Redirects
301 redirects are lesser known secrets for improving your SEO.
When used correctly, they can help you restructure or migrate your site and clean up messy URLs.
Even better, they help you keep your existing rank and traffic – and if all goes well, even increase it.