When moving domains or changing certain pages URL structure you must set up 301 redirects to ensure the SEO juice of your site stays in tact.
What is a 301 redirect?
A 301 redirect simply means the original old URL has been permanently moved.
There are a couple of ways to setup 301 redirects on your site. We will go over the three most popular methods
- With WordPress plugins
- Editing your htaccess file
- Using Your SEO plugin
1. Using A WordPress Plugin for 301 Redirects
I used and recommend Redirection, which you can grab from the wordpress repository
It will automatically setup redirects when you change old permalinks (although I would recommend not changing existing permalinks on an older site, as the SEO benefit is negligible)
Setting up 301 Redirects in Redirection Plugin
After installing the redirection plugin, head into tools > Redirection.
Input the Source URL and it’s new home
After you insert the old url and the new target destination, click on add redirection and your 301 redirect is set.
It’s that easy.
2. Using the Htaccess file in your WordPress Install to Setup 301 Redirects
To manually add in the 301 redirects in your htaccess file you will need to connect via FTP to your wordpress directory and select the htaccess file to edit
Edit the htaccess file
Be careful when manually editing your htaccess file and make sure you back it up (in another text doc) before saving any changes you have made. This is just in case you mess up some syntax somewhere so you can revert to the original.
The syntax for 301 redirects is very simple:
Redirect 301 /old-page.html http://www.site.com/new-page/
The above redirect will take the url http://www.site.com/old-page.html and redirect it to http://www.site.com/new-page/
You can only have 1 redirect per line in the htaccess file.
Redirect Your Old Links!
In closing, I just want to reiterate the point that setting up 301 redirects is a critical step when updating your site, moving domains, or changing your content management system.
If you do not redirect all of those old links to the new pages that actually do still exist on the web, all those precious inbound links will vanish to your site and you can basically starting over from scratch in terms of SEO.