Mass 301 redirect using .htaccess or WordPress plugins
It comes a day when you start making changes in your website. These changes can be from a simple change in design to completely change the CMS that powers the site. Or maybe you are moving your site from an old domain to a new one. In these case you want to make sure that the links you have worked hard to rank in Google, don’t just disappear. You want to redirect them to the new ones. How? By using 301 redirect of course!
There are three types of redirects. We want to make sure to use the right one, 301 redirect which tells Google that this link has moved permanently. The other two types are 302 (found or moved temporarily) and Meta Refresh. More about redirection you can read at this awesome guide by Moz.
In this article i’m going to write about two ways to mass 301 redirect links by using .htaccess and WordPress (because it’s to damn popular to ignore it).
Mass 301 redirect using .htaccess
Mass redirection in .htaccess it’s pretty easy actually. All you need to do is open your .htaccess file in the root of your site and add these lines of code:
Redirect 301 /old-page.html http://www.example.com/new-page.html Redirect 301 /old-page-2.html http://www.example.com/file/
You can also 301 redirect an entire site with just one line of code:
Redirect 301 / http://www.new-site.com/
Mass 301 redirect using WordPress plugin
Redirect Editor is this awesome plugin which I use whenever I need to redirect links from my WordPress sites. After installing the plugin, all you have to do is start adding links you want to redirect from your site.
It’s very important that whenever you change something in your link structure to be careful of what it’s going to happen with the old links. You don’t want to see all SEO traffic going to 404 error pages (which eventually will follow with a drop in rankings). It’s also a bad experience to the visitors. So whenever you make these change you have to be sure that the old links are pointing to the new ones.