How to Configure Redirects for Static WordPress Hosting?
First make sure that Static WordPress hosting on Netlify is working fine.. If you haven’t watched that video then pause here and go to watch that installation video. Here is the link to the video.
WordPress on Netlify - Updated Tutorial Wih Cloud Hosting as Backend - YouTube Video Opens in New Tab [See Terms and Conditions for 3rd party links.]
While deploying WordPress on Netlify with a static-wordpress
repository, just make sure that you have the latest version of static-wordpress
software from Github repository. You can create as many copies of this software as you want. Just relink the repository from Netlify which I will show you in a while.
Managing WordPress Redirects
Custom Redirect Page
Old Approach which has be extensively discussed in our old tutorial. This approach is not recommended any more. Please use WordPress Redirection Plugin to mange redirections as mentioned in the next heading.
Redirection Plugin (Recommended)
This is a new approach which we have added to our workflow. For this approach to work, you need to add “Redirection ” Plugin from WordPress Plugin Repository.
Install Redirection WordPress Plugin [Image Credits: Faisal Shahzad (SEO Wings)]
Go to your WordPress installation and Add Redirection Plugin.
You need to search for the redirection plugin and then click on install and then activate it.
In settings, you can configure your redirects. You will find them under the Tools tab.
Add New Redirect [Image Credits: Faisal Shahzad (SEO Wings)]
-
source url should be relative i.e. after you website afilate-blog.netlify.app/source
-
target url should be where you want to redirect it e.g. internal or external page
-
Click on the gear button and then select the desired HTTP code e.g. 301 (move permanently). Choose desired code from drop down list.
Examples
Let’s create two redirects for our website
Redirecting To Serpwings Home Page
source url - /serpwings destination - https://serpwings.com HTTP code - 301
Redirecting To SEOWings Home Page
source url - /seowings destination - https://www.seowings.org HTTP code - 301
Conclusion
Existing Redirects with custom pages are not recommended anymore. If you are using that old page based method for redirects then it is highly recommended that you delete the redirect page and create these redirects using this plugin.
Faisal Shahzad
Hi, I am Faisal. I am working in the field of Search Engine Optimization (SEO) and Data Sciences since 2002. I love to hack workflows to make life easy for people around me and myself. This blog contains my random thoughts and notes on Digital Marketing, Affiliate Marketing, Static WordPress Hosting with Netlify and CloudFlare Pages, Python, Data Science and open-source projects.