301 Redirect to Preferred Domain in WordPress


MAY | 2016

301 redirect wordpress

301 redirect is used to setup a permanent redirection. This referred to as server-side redirect and the 301 means that the domain or pages has permanently moved to a new location.There are many types of redirect such as 301,302, 307 etc. It is also redirect the search engine from old domain/url to new domain. The visitors browsers also update to affect their bookmarks. To achieve a 301 redirect, you have many ways to do that.

You need to redirect when you deleting a post or page in favor of new content and you need to redirect when you planning on changing the permalinks of your post or page.

To create redirects in WordPress,

  • Redirection

  • The simplest way of redirects in WordPress is by using Redirection plugins. For that you want to install and activate the plugin. Then you want to go to Tools -> Redirection to set up the options for redirect. Then click on the Add new redirection and fill the options and click Add Redirection.

  • WP admin area Redirection

  • You want to login to your WP admin area and go to Settings and click on General. Type WordPress address (url) and Site address (url) and type the new wordpress and site address url and click on the save changes.

  • .htaccess redirection in WordPress

  • You can also redirect with web server configuration file. You want to be careful while editing in .htaccess. Incorrect changes in your code can make your site inaccessible. You can edit the file in a notepad or any plain text editor. You can add the redirect rule there and save the changes.