This article helps you how to Apply Permanent 301 Redirection htaccess wordpress step by step.
Al Ḩayy 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.
cenforce avis 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.
obligatorily 301 Redirect .htaccess Code Example:
=> Place this code in .htaccess file
Chetput <IfModule mod_rewrite.c>
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 http://www.mydomain.com/new-page
Entire Domain Redirect:
Redirect 301 / http://www.newdomain.com/
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:
- Go to your cPanel.
- In the Files section of the cPanel, click On File Manager.
- The File Manager opens in a new tab. Click on the Settings button at the top right.
- In the Preferences window, check the Show Hidden Files checkbox. Click the Save button.
- The File Manager window now shows all files, including hidden ones. In the Filespanel, double-click the public_html item.
- 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.
- Click the +File button at the top left.
- In the New File window, enter the filename as .htaccess and click Create New File.
- The .htaccess file appears in the list.
- In the Text Editor dialogue box, scroll down and make sure utf-8 is selected. Then click the Edit button.
- Click once on the .htaccess file to select it, then click Edit. And paste redirection code.
- When you’re done editing the .htaccess file, click the Save Changes button at the top right of the Text Editor window.
- 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:- email@example.com
Er. Raju Kaushik