A 301 redirect simply inform the search engines that a page has been permanently moved. In most cases, a 301 redirect is the best way of implementing redirects on a website.
To set up 301 redirect on your website, there are couple of ways.We will discuss the three most popular methods:
- With WordPress plugins
- Edit your htaccess file
- Using Your SEO plugin
1. Using A WordPress Plugin for 301 Redirects
Use a Redirection plugin which you can get from WordPress repository. After installing the redirection plugin, Go into tools > Redirection.
Insert the old URL and the new target destination, click on add redirection and your 301 redirect would be set.
2. Using the Htaccess file to create 301 Redirects
One of the easiest ways to create a 301 redirect is using the .htaccess file in your website’s directory. It is quick and search-engine friendly.
To manually add 301 redirects in your .htaccess file connect via FTP and select the .htaccess file to edit.
Keep in mind that this method is only for Apache servers.
To redirect a single page:
Redirect 301 /oldpage.html http://www.yoursite.com/newpage.html
To redirect an entire website:
Redirect 301 / http://newsite.com/
You can place 1 redirect per line in the .htaccess file.
3. Using Yoast SEO for editing htaccess
You can also edit your htaccess file through the Yoast WordPress SEO Plugin. However It would highly recommend to use an FTP client like filezilla to do it.