MENUMENU
  • Services
    • Services
      • Search Engine Optimization
      • International Search Marketing
      • Local Search Marketing
      • Pay Per Click Advertising
      • Social Media Marketing
      • Email Marketing
      • Conversion Rate Optimization
      • Public Relations
      • Website Design & Development
      • Reporting & Analytics
      • Amazon Marketing Services
      • Digital Marketing Strategy
      • Franchise Marketing
  • Case Studies
  • About Us
    • About Ignite Visibility
      • Our Story
      • Clients
      • Our Values
      • Diversity & Inclusion
      • Our Team
      • UCSD Extension Courses
      • Careers
  • Thought Leadership
      • Our Blog
      • Podcast
      • SEO: The Movie
      • Social Media Marketing: The Movie
      • Book: The Forecaster Method
      • Attend Our Next Digital Marketing Event
  • Contact
  • 619.752.1955
Home / Search Engine Optimization / The Ultimate List of 301 Redirect Examples for SEO

The Ultimate List of 301 Redirect Examples for SEO

December 17, 2014 By John E Lincoln

Google recommends using 301 redirects to promote SEO when changing the URL of a web page. To ensure users and search engines are redirected to the correct page, it’s advised a server-side 301 redirect is in place to show search engines that a page has been moved to a new location. A 301 redirect is part of facilitating a transition when moving a website to a new domain {a very small part!}, it is the go to when you need to change a URL and basically it is a staple point in the SEO field.

In order to create a successful redirect to meet Google’s standards, your server’s .htaccess file will need to be accessed when using Apache. However, should your site be hosted on a server using software, your hoster will have additional details on how to implement the redirect. We talk a little more about 301 redirects with plugins later, in most cases with modern day CMS systems this is the best option.

The Ultimate List of 301 Redirect Examples for SEO

The Ultimate List of 301 Redirect Examples for SEO

 

301 Redirects for SEO

Matt Cutts addresses the 301 in video, stating that you can lose a little link juice in the transfer. I have done thousands of 301 redirects in hundreds of situations. It usually takes 1 to 4 weeks for Google to pick up the redirect. Following this, 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

In this post we talk mostly about redirects 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 past what you want done. In the case of a CMS like Drupal, Magento, etc, there are also easy plugins you can use. This post looks more at the technical side and explores certain situations.

Basic 301 Redirects in 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 https://www.yourwebsite.com/newpage.html

Directory URL and All Content

To redirect an entire directory, all URLs, and all content, use:

RedirectMatch 301 ^/olddirectoryname/ https://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 ^(.*)$ https://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 ^(.*)$ https://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 https://www.yournewsite.com

Redirect 301 /oldsite2.htm https://www.yournewsite.com

Redirect 301 /oldsite3.htm https://www.yournewsite.com

Redirect 301 /oldsite4.htm https://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$ https://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(.*) https://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 a 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: https://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’,”https://www.yournewsite.com/

404 Errors

Despite what you may have heard, do not use rel-canonical in place of a 301 redirect as it’s designed to resolve multiple URL issues. Instead, the best option to keep Google happy and to prevent 404 errors is to stick with a 301 redirect. 301 redirects are the ideal method to use to maintain SEO should you have redesigned your website, need to rid duplicate content, resolve multiple domain issues, or change domain names. However, if not performed correctly, users will receive a 404 error. To reduce the chance of an error, make sure you fully test your redirects and use the appropriate code pertaining to your website. There are many uses for the rel canonical and if a 301 cannot be performed it is generally the next best option. We always stay away from robots.txt files and URL parameters in Webmaster Tools if possible, in almost all cases a 301 or rel canonical is a better way to solve the issue.

Sources:

“Redirect” Moz.com

About John E Lincoln

John Lincoln (MBA) is CEO of Ignite Visibility (a 2017, 2018, 2019 and 2020 Inc. 5000 company) a highly sought-after digital marketing strategist, industry speaker and author of two books, "The Forecaster Method" and "Digital Influencer." Over the course of his career, Lincoln has worked with over 1,000 online businesses ranging from small startups to amazing clients such as Office Depot, Tony Robbins, Morgan Stanley, Fox, USA Today, COX and The Knot World Wide. John Lincoln is the editor of the Ignite Visibility blog. While he is a contributor, he does not write all of the articles and in many cases he is supported to ensure timely content.

You may also like:


  • SEO Study Reveals the Biggest Investments for 2023
  • Semantic Search
    What is Semantic Search? Does it Matter for SEO in…
  • How to Rank #1 on Google
    How to Rank 1st on Google – SEO for 2023

  • What are YMYL Websites? YMYL Content, Pages, and E-E-A-T

Search Here

NEWSLETTER // SIGN UP NOW

About The Editor

John E Lincoln, CEO

John Lincoln is CEO of Ignite Visibility, one of the top digital marketing agencies in the nation and a 6x Inc. 5,000 company. Lincoln is consistently named one of the top marketing experts in the industry. He has been recipient of the Search Engine Land "Search Marketer of the Year" award, named the #1 SEO consultant in the USA by Clutch.co, most admired CEO and 40 under 40. Lincoln has written two books (The Forecaster Method and Digital Influencer) and made two movies (SEO: The Movie and Social Media Marketing: The Movie) on digital marketing. He is a digital marketing strategy adviser to some of the biggest names in business. John Lincoln is the editor of the Ignite Visibility blog. While he is a major contributor, he does not write all of the articles.

LEARN MORE ABOUT JOHN

Contact Us. Let’s Chat!

  • Hidden

Marketing Guides

SEO In 2020: How To Prepare For Major Disruption

"SEO: The Movie" - Have You Seen Our Film? Watch Now

"Social Media Marketing: The Movie" - Have You Seen Our Film? Watch Now

Amazon Seller Central vs Vendor Central

Listen To The Podcast Featuring The Best Minds In Marketing

John Lincoln Interviews Global Director of Digital Marketing & Strategy at Qualcomm, Jessica Jensen

Check Out 227 Free Online Marketing Classes

The 2020 Guide To Dominating SEO With Advanced Schema

Learn More About Our Digital Marketing Agency

Learn More About Our SEO Services

Learn More About Our Paid Media Services

SELECT CATEGORY

Become A Contributor

Interested in writing for Ignite Visibility?

APPLY NOW

Services

  • Search Engine Optimization
  • Pay Per Click Management
  • Conversion Rate Optimization
  • Website Design & Development
  • Social Media Company
  • Public Relations
  • Amazon Marketing Services
  • Franchise Marketing
  • International Services
  • Digital Marketing Agency Services

About

  • Our Team
  • Our Values
  • Clients
  • Reviews
  • UCSD Extension Courses
  • Careers
  • Tools & Resources
  • Sitemap

Contact

4250 Executive Square, Suite 100
La Jolla, California 92037

619.752.1955

Join The Newsletter

Sign up for our newsletter to get the latest from Ignite Visibility.

google parther logo

©2023 Ignite Visibility. All Rights Reserved. Privacy Policy