Disclosure: Some of the links to products in this article are affiliate links. It simply means, at no additional cost to you, we’ll earn a commission if you click through and buy any product.
This is the step-by-step tutorial on How To Redirect WordPress URL with .htaccess file without using any extra plugin. If you are getting lots of 404 error on your website and want to redirect them to a new page, then the .htaccess file is the best solution that you can use without installing extra plugin for simple task.
How To Redirect WordPress URL With .htaccess?
Step 1: Log in to your cPanel > Go to File Manager
Step 2: Find the .htaccess file of your domain > right click > Edit
Step 3: Tap on Edit in the pop-up window
Step 4: At the end of the .htaccess file type Redirect 301 /page-one/ https://www.hextoid.com/page-two/
Step 5: Replace /page-one/
URL with the error page URL and replace https://www.hextoid.com/page-two/
with destination URL
Step 6: Click Save Changes
Once it is saved, the redirection is successfully created without any plugin. But you don’t want to play with this many processes, follow the below method, in which we will be using free version of Yoast SEO to create redirection.
How To Redirect URL With .htaccess?
Step 1: Log in to your WordPress Dashboard
Step 2: Go to Yoast SEO > Tools
Step 3: Click on File Editor
Step 4: At the end of the .htaccess code type Redirect 301 /page-one/ https://www.hextoid.com/page-two/
Step 5: Replace /page-one/
URL with the error page URL and replace https://www.hextoid.com/page-two/
with destination URL
Step 6: Click Save changes to .htaccess
This is how you can set 301 redirection in WordPress with and without plugin. If you have any further query please drop them in the below comments.