PHPMatters Help You Better Hosting Your PHP-based Sites
How to Create WordPress Redirect Page for Better Information Showcase

How to Create WordPress Redirect Page for Better Information Showcase

At various occasions, we need to transfer our pages or posts from an existing URL to a fresh address. In some cases, the existing address is then abandoned, and an “Error 404” page is left to be displayed on it. But, as the page is shifted and not abandoned, you should create a redirect page instead of an Error 404 page. A WordPress redirect page offers various features and benefits that help in the SEO as well as reputation of the website.

In this article, we have discussed the reasons to create WordPress redirect page followed by the methods to create these pages effectively.

Reasons to Create WordPress Redirect Page

301 redirectCreating redirect pages in WordPress informs the search engines that a webpage has permanently moved. This information is appreciated by the search engines as the result of where the page ranks and all the other factors that have been provided to the existing page that is transferred to the new page.

There is a popular redirect technique known as 301 Redirect. This redirect page is created and used by many website owners so that the search engine rankings and traffic on the page doesn’t get negatively affected.

Methods to Create WordPress Redirect Page

There are several methods by which you can create a redirect page on your WordPress site. As different developers prefer distinguished techniques, discussed here are all the major methods to create a redirect page effectively.

Create using htaccess

The htaccess method is the most critical technique. Even the slightest of mistake in the htaccess file is enough to not only waste your effort but also bring your whole site down. Therefore, we recommend this method to those developers only who have the fair knowledge of using WordPress and modifying htaccess file.

It should be noted that you must create a backup of your WordPress site before starting with this procedure. It can provide you with a cushion to restore data if anything wrong happens while bringing modifications to the htaccess file.

Starting with the procedure, you should make sure that you are using none other than apache server. Now, you need to mention the old location as well as the new location of the page. This can be done by entering the following code.

redirect 301 page code

The above-mentioned code is sufficient enough to redirect a visitor from your old location to the new one. If you are shifting an entire website from one location to the other or simply move to a new domain, you don’t need to enter the code individually. You can simply add one code to redirect a whole website. The code that you should enter is as below.

redirect 301 site code

After saving the settings successfully, your old location can redirect visitors to the new location with a 301 redirect. You can check if the process is working by loading the page you’ve redirected. If the method is correctly implemented, you can be redirected to the new location.

Create using PHP code

It is possible to create a redirect page on a WordPress site by following the PHP code method. You can apply redirects in a diverse range of languages such as ColdFusion, Perl, ASP and Java. Apart from it, you can utilize the http-equiv attribute for adding a meta tag into the header of the page that is supposed to be redirected.

As the PHP platform is used by WordPress, all the scripts that are integrated with WordPress tend to use the same platform. Therefore, if you are struck into a situation where you require redirecting a PHP webpage, you can use this PHP redirect process. For this, all you need to do is to enter the following code into the header of the page.

redirect php code

It should be noted that using the “301 Moved Permanently” is recommended because it informs the search engines that your webpage is using a 301 redirection. Adding to it, the code should be entered in the header to make sure that the redirection task is successfully implemented.

Create using Plugin

If you do not like to play with the basic structure of your website by editing the PHP or htaccess file, this is a preferable option for you. You can simply use a plugin to create redirect page in your WordPress site. There are various plugins in the store, but we recommend you to use Quick Page Redirect Plugin because it allows you to create 301,302 and 307 redirect pages.

export redirect

You can use this plugin by installing and activating it on your site easily. Upon activation, all you need to do is to enter the old location and new location in respective boxes. Once done, you can check the box located beside Destination Address box to redirect the page.

set destination

The plugin method is considered as the safest method of redirecting your WordPress page because the risk of data loss is negligible in it. Also, it involves the least concentration and effort when compared to other methods for redirecting. Therefore, if you are looking for the easiest method, you can simply use the plugin.