How To Apply Permanent 301 Redirection .htaccess Code In WordPress (Step By Step)

This article helps you how to Apply Permanent 301 Redirection htaccess wordpress step by step. What Is 301 Redirect :

301 redirect is a server side redirect and is a permanent redirect. A permanent 301 redirect in your .htaccess file lets search engines and others know that an old link has been replaced by a new one.

A permanent 301 redirect, which refers to the http status code, tells the search engines that the original URL has now moved or updated to a new URL.

Mehtar Lām Common uses of a 301 .htaccess redirect:

  • After a move to a new domain, use a 301 redirect on the old domain to send visitors to the new site.
  • An old file has moved locations, or the information is now contained in a new file.
  • After moving old site pages to a new site structure, use 301 redirects to send users to the new pages.
  • After combining two sites, use 301 redirects to ensure visitors go to the new pages.

Tiraspolul 301 Redirect .htaccess Code Example:

=> Place this code in .htaccess file

<IfModule mod_rewrite.c>

RewriteEngine On

Redirect 301 /how-to-speed-up-your-wordpress-website/ /how-to-bulk-product-upload-via-csv-in-wordpress/                                                      Like: Redirect 301 /oldurl/ /newurl/



Single Url Redirect :

This is the cleanest way to redirect a URL. Quick, easy, and search-engine friendly.

Redirect 301 /old-page

Entire Domain Redirect:

Redirect 301 /

How to implement a .htaccess file using the cPanel File Manager

The cPanel File Manager provides an easy way to create or access a .htaccess file. Here’s how:

  1. Go to your cPanel.
  2. In the Files section of the cPanel, click On File Manager.

  1. The File Manager opens in a new tab. Click on the Settings button at the top right.
  2. In the Preferences window, check the Show Hidden Files checkbox. Click the Save button.

  1. The File Manager window now shows all files, including hidden ones. In the Filespanel, double-click the public_html item.
  2. The contents of the public_html folder now display. This is where your .htaccess file will live. For a new site, there isn’t a .htaccess file yet, so you’ll need to create it.
  3. Click the +File button at the top left.
  4. In the New File window, enter the filename as .htaccess and click Create New File.

  1. The .htaccess file appears in the list.

  1. In the Text Editor dialogue box, scroll down and make sure utf-8 is selected. Then click the Edit button.

  1. Click once on the .htaccess file to select it, then click Edit. And paste redirection code.

  1. When you’re done editing the .htaccess file, click the Save Changes button at the top right of the Text Editor window.

  1. You can now close the Text Editor tab. Now test your redirection is working. 

Thank for Reading my article, Hope you like this if any problem or query regarding this article please drop you query on my mail:-

Er. Raju Kaushik


22 Replies to “How To Apply Permanent 301 Redirection .htaccess Code In WordPress (Step By Step)”

  1. Have you ever considered about adding a little bit more than just
    your articles? I mean, what you say is important
    and all. Nevertheless just imagine if you added some great images or
    videos to give your posts more, “pop”! Your content
    is excellent but with images and videos, this website could definitely be one of the most beneficial in its field.

    Wonderful blog!

  2. Heloo There. I found your blog using google. This is an extremely well written article.
    I’ll make sure to bookmark it and return to read more of your useful information. Thanks for the
    post. I’ll certainly return.

  3. Howdy! This post couldn’t be written any better! Reading
    through this post reminds me of my good old room mate!
    He always kept chatting about this. I will forward this page to him.

    Pretty sure he will have a good read. Thank you for sharing!

Leave a Reply

Your email address will not be published. Required fields are marked *