Deleting A Webpage? Keep 'Permanent Redirects'
[ad_1]
Are you deleting a web page or updating an URL? Moving files on your server?
Then use 'Permanent redirect' method. This is a way to tell the server to redirect the visitor to new url when they come to old url. This applies to search engines too. When a search engine robot visits your old page, it will be notified about new url by this 301 redirect.
You have to keep a 'RewriteRule' in your.htaccess file in your root directory of your web site, if you are on Apache server.
Easy way to set up these rewriterule:
If your host provides cpanel, login into the cpanel. Go ro 'Redirects' link. You will see a form to enter the old url and new url. Enter both urls. Remember part of the url is already will be there. So enter partial url carefully. Select 'Permanent' option in drop-down box. Click on 'Add' button. You will see the redirection added below.
Directly adding to the.htaccess file:
If you are not on cpanel or your host didn't enable GUI version interface, you have to add the following code to your.htaccess file.
Go to your root directory. You will see a file named.htaccess. Open it in your web panel (or create a htaccess.txt file on your computer, add the following code to it and upload in ASCII. Rename it to.htaccess) and add the following code:
(IMPORTANT: Remove ALL TEN ' # ' signs from the following lines before using it)
--------------------------
RewriteEngine on
RewriteCond %HT#TP_HOST ^.*$
RewriteRule ^folder/1.php$ http:#/#/#www#.yoursite/folder2/1.php [R=301,L]
RewriteCond %HT#TP_HOST ^.*$
RewriteRule ^folder/2.php$ http:#/#/#www#.yoursite/folder2/2.php [R=301,L]
-------------------------
Why you need to setup these redirects?
Good question!
1. Your old url might have been saved in your visitor's Favorites folder. So if you delete them, they will see 404 error pages. Instead, redirect them to present url. Who knows, he will become your buyer...
2. Search engines have been indexed your old url. This 'permanent redirect' makes them to update their index with your new url.
3. You might been submitted articles or affiliate link redirects. So if you remove that url, the purpose of your article marketing will be a waste.
So ALWAYS, ALWAYS use redirects to hold the traffic that can slip through your 404 error pages.
[ad_2]Source by Radhika Venkata https://shentharindu.com/deleting-a-webpage-keep-permanent-redirects/?feed_id=17277&_unique_id=62ea9a43a4c8b&utm_source=&utm_medium=sadmin&utm_campaign=FS%20Poster
Comments
Post a Comment