Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home3/shirazal/public_html/orionsocial/wp-content/plugins/envato-elements/inc/api/class-settings.php on line 92

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home3/shirazal/public_html/orionsocial/wp-content/plugins/envato-elements/inc/api/class-settings.php on line 92

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home3/shirazal/public_html/orionsocial/wp-content/plugins/envato-elements/inc/api/class-settings.php on line 113

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home3/shirazal/public_html/orionsocial/wp-content/plugins/envato-elements/inc/api/class-settings.php on line 151

Warning: Cannot modify header information - headers already sent by (output started at /home3/shirazal/public_html/orionsocial/wp-content/plugins/envato-elements/inc/api/class-settings.php:92) in /home3/shirazal/public_html/orionsocial/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home3/shirazal/public_html/orionsocial/wp-content/plugins/envato-elements/inc/api/class-settings.php:92) in /home3/shirazal/public_html/orionsocial/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home3/shirazal/public_html/orionsocial/wp-content/plugins/envato-elements/inc/api/class-settings.php:92) in /home3/shirazal/public_html/orionsocial/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home3/shirazal/public_html/orionsocial/wp-content/plugins/envato-elements/inc/api/class-settings.php:92) in /home3/shirazal/public_html/orionsocial/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home3/shirazal/public_html/orionsocial/wp-content/plugins/envato-elements/inc/api/class-settings.php:92) in /home3/shirazal/public_html/orionsocial/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home3/shirazal/public_html/orionsocial/wp-content/plugins/envato-elements/inc/api/class-settings.php:92) in /home3/shirazal/public_html/orionsocial/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home3/shirazal/public_html/orionsocial/wp-content/plugins/envato-elements/inc/api/class-settings.php:92) in /home3/shirazal/public_html/orionsocial/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home3/shirazal/public_html/orionsocial/wp-content/plugins/envato-elements/inc/api/class-settings.php:92) in /home3/shirazal/public_html/orionsocial/wp-includes/rest-api/class-wp-rest-server.php on line 1831
{"id":1167,"date":"2020-12-22T09:44:19","date_gmt":"2020-12-22T09:44:19","guid":{"rendered":"https:\/\/orionsocial.com\/?p=1167"},"modified":"2020-12-22T09:44:24","modified_gmt":"2020-12-22T09:44:24","slug":"301-redirect-to-rename-or-move-files-or-folders","status":"publish","type":"post","link":"https:\/\/orionsocial.com\/301-redirect-to-rename-or-move-files-or-folders\/","title":{"rendered":"301 Redirect-To rename or move files or folders"},"content":{"rendered":"\n

301 Redirect \u2013 In this article, I will discuss page redirection techniques, what works, and what to avoid.<\/p>\n\n\n\n

What is page redirection and why would you want to use it?<\/p>\n\n\n\n

Let\u2019s say you rename a page on your website, for whatever reason. Perhaps you decided to revamp your entire naming convention, perhaps you decided to restructure your site and need to move pages into different folders, or you just realized that you are missing valuable keywords.<\/p>\n\n\n\n

Let\u2019s elaborate a bit on the keywords issue, since it is part of your search engine ranking success.<\/p>\n\n\n\n

301 Redirect \u2013 Let\u2019s say the page in question is about customized USB drives and you named it page1.htm. Then you read some SEO (Search Engine Optimization)<\/a> articles and you found out that some search engines use words in the actual file name as search keywords.<\/p>\n\n\n\n

Next time you do a Google search, take a look at the results, most will have words in the actual file name (in the URL section) bolded, denoting a keyword match. Your USB drives page will definitely benefit if named something like custom_usb_drives.htm instead.<\/p>\n\n\n\n

Now that you renamed your page, you just created a symphony of issues for yourself, for your users and for your position in search engine results.<\/p>\n\n\n\n

301 Redirect \u2013 Linking issues:<\/strong><\/h2>\n\n\n\n

You will have to point every link on your site to the new page name. If your site is small, it should not be a big deal, but if your site is large, you will inevitably make mistakes, mainly forgetting a link or two.<\/p>\n\n\n\n

This will result in visitors getting the dreaded \u201c404 page not found\u201d error when clicking on your links, robots (also know as crawlers or spiders) avoiding you, etc. Also, if you are heavily relying on visitors from search engines, then again, people will get a \u201c404 page not found error\u201d.<\/p>\n\n\n\n

301 Redirect \u2013 Let\u2019s use the previous example, for a long time your page1.html indexed by search engines. If someone types \u201ccustom USB drives\u201d in a search engine box, your page shows up on the first search results screen.<\/p>\n\n\n\n

That is fantastic, only if someone clicks on the link, they will be pointed to page1.htm, not to custom_usb_drives.htm, because the first page is the one in the search engine\u2019s index.<\/a> It will take time, sometimes months, before the search engines update their indexes with your new page name.<\/p>\n\n\n\n

301 Redirect \u2013 Lost Page Rank (PR) issues:<\/strong><\/h2>\n\n\n\n

301 Redirect \u2013 Google developed a proprietary algorithm that assigns a Page Rank (PR) to every page on the web. PR is a number from 1 to 10 (10 being the ideal) and intended to represent how useful and popular a given page. PR influence\u00a0<\/strong>by many factors, one of the crucial ones being Link Popularity. Link Popularity is a representation of how many \u201cquality\u201d or \u201crelevant\u201d sites link to your page.<\/p>\n\n\n\n

Without getting into too much detail, it is increasingly difficult and time consuming to achieve a high PR for your pages, especially if you don\u2019t have a really unique website with exceptional and highly sought after content.<\/p>\n\n\n\n

If you are merely operating a commercial site, in a competitive market (such as selling custom branded USB drives, as in our example), then it takes a lot of time and hard work to build a good page PR.<\/p>\n\n\n\n

When you rename a page and discard the old page, you also discard the PR of the page. Your renamed page see as a new page with 0 PR.<\/p>\n\n\n\n

What is the solution?<\/p>\n\n\n\n

I will start by enumerating some of the methods used by the non-initiated.<\/p>\n\n\n\n

301 Redirect \u2013 Not recommended solution 1: Duplicate content.<\/strong><\/h2>\n\n\n\n

The first thing that probably comes in your mind is: well, why can\u2019t you just duplicate the page and let nature take its course. In other words, you will have two identical pages, one named page1.html and one custom_usb_drives.html. This gives you time to update all links and the search engines will eventually index the new page.<\/p>\n\n\n\n

This solution is not viable because search engines will penalize you quite badly, \u2018thinking\u2019 that you are trying to scam them by using the \u2018duplicate content\u2019 technique.<\/p>\n\n\n\n

Not recommended solution 2: Custom error message.<\/strong><\/h2>\n\n\n\n

You could create a custom error page. However, you will lose rankings on the next search engine update as the file will appear to be non-existent. As discussed above, it could be some time before the page with the new name will be indexed and will appear in people\u2019s searches.<\/p>\n\n\n\n

Also, your web site visitors will be frustrated by the fact that they now have to dig through your site to find the desired information.<\/p>\n\n\n\n

Not recommended solution 3: An HTML Meta redirect.<\/strong><\/h2>\n\n\n\n

You could implement a so-called Meta refresh in a blank or customized page that has the name of the old page (in our example, page1.htm) that points to the new page. The 301 redirect can be instant or delayed by a predetermined amount of time.<\/p>\n\n\n\n

The delayed redirect has the advantage that you can place an extra message, such as \u201cplease be aware that the page you are looking for changed location\u2026.. etc., etc\u2026. you will be redirected automatically to the new location\u201d<\/p>\n\n\n\n

In the past, this was probably the most used technique.<\/p>\n\n\n\n

Without getting into the mechanics of the Meta redirect, which is basically a META tag statement your ad to your HEADER section, know that there are also Java Script techniques that achieve similar results.<\/p>\n\n\n\n

What is bad about this is that this is a technique often used by spammers to trick search engines and it should avoid, unless the page is in a section of your site that indexed (also known as spidered or crawled).<\/p>\n\n\n\n

Search engine spammers create a page that optimizes for certain keywords and phrases it usually has no real content. The page a picked up by some search engines, but when a visitor clicks on the search engine entry, they redirected to another site, often unrelated. Most search engines have filters to detect this.<\/p>\n\n\n\n

Using this form of search engine deception will see a site eventually banned or penalized by major players such as Google.<\/p>\n\n\n\n

The recommended redirect strategy \u2013 301 Redirect<\/strong><\/h2>\n\n\n\n

A 301 redirect is the most efficient, visitor-friendly, robot (spider, crawler) friendly, and search engine friendly solution around for websites that host on servers running Apache. If you are not sure, check with your hosting provider.<\/p>\n\n\n\n

A 301 redirect is just a set of commands you type into your .htaccess file.<\/p>\n\n\n\n

When a visitor (whether human or robotic) requests a web page via any means, your web server checks for a .htaccess file. The .htaccess file contains specific instructions for certain requests, including security, redirection issues, and how to handle certain errors.<\/p>\n\n\n\n

The code \u201c301\u201d interpret as \u201cmoved permanently. After the code, the URL of the missing or renamed page noted, followed by a space, then followed by a new location or file name.<\/p>\n\n\n\n

First of all, you\u2019ll need to find the .htaccess file in the root directory of where all your web pages are stored. If there is no .htaccess file there, you can create one with Notepad or a similar application. Make sure when you name the file that you remember to put it at the beginning of the file name. This file has no tail extension.<\/p>\n\n\n\n

Some hosting providers offer redirect services through their \u201ccontrol panels\u201d. so you don\u2019t have to perform low-level changes on the .htaccess file itself. Instead, they provide a user-friendly interface for this. Check with your hosting provider to see what the optimal way to perform a 301 redirect is in your case. I will continue the article with the barebones solution.<\/p>\n\n\n\n

If there is a .htaccess file already in existence with lines of code present, be very careful not to .change any existing line unless you are familiar with the functions of the file.<\/p>\n\n\n\n

Scroll down past all the existing code, leave a line space, then create a new line that follows this example:<\/h2>\n\n\n\n

redirect 301 \/folder\/page1.htm<\/p>\n\n\n\n

It\u2019s as easy as that. Save the file, upload it back into your web and test it out by typing in the old address to the page you\u2019ve changed. You should be instantly and seamlessly move to the new location.<\/p>\n\n\n\n

Notes: Be sure not to add \u201chttp:\/\/www\u201d to the first part of the statement. \u2013 just put the path from the top level of your site to the page. Also, ensure that you leave a single space between these elements:<\/p>\n\n\n\n

redirect 301 (the instruction that the page has moved)<\/strong><\/h2>\n\n\n\n

\/folder\/page1.htm (the original folder path and file name)<\/p>\n\n\n\n

(new path and file name)<\/p>\n\n\n\n

The same format applies not only to renamed files, but also to files moved to a different location.<\/p>\n\n\n\n

The 301 redirect is the safest way to preserve your rankings. On the next indexing (crawling, spidering), the search engine robot will obey the rule indicated in your .htaccess file and index the new page name every time a link or its internal database tries to access the old page.<\/p>\n\n\n\n

In the next update (again, this could take months), the old filename and path dropped and replaced with the new one.<\/p>\n\n\n\n

Sometimes you may see alternating old\/new file names during the transition period. along with some possible fluctuations in rankings as things settle. Don\u2019t panic, this is normal.<\/p>\n\n\n\n

What if your site is hosted on a Microsoft IIS server instead?<\/h2>\n\n\n\n

If you have access to the server, do this: In internet services manager, right click on the file or folder you wish to redirect. Select the radio titled \u201ca redirection to a URL\u201d. Enter the redirection page, check \u201cThe exact URL entered above\u201d and the \u201cA permanent redirection for this resource\u201d. Click \u201cApply\u201d.<\/p>\n\n\n\n

If you do not have access to the server, ask your host to point you into the right direction.<\/p>\n\n\n\n

In conclusion, the best and the most transparent way (to both human and robotic users).to rename and move files on your web site, while preserving your search engine ranks is the 301 redirect.<\/p>\n","protected":false},"excerpt":{"rendered":"

301 Redirect \u2013 In this article, I will discuss page redirection techniques, what works, and what to avoid. What is page redirection and why would you want to use it? Let\u2019s say you rename a page on your website, for whatever reason. Perhaps you decided to revamp your entire naming convention, perhaps you decided to […]<\/p>\n","protected":false},"author":1,"featured_media":1189,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[68,1],"tags":[69,70],"_links":{"self":[{"href":"https:\/\/orionsocial.com\/wp-json\/wp\/v2\/posts\/1167"}],"collection":[{"href":"https:\/\/orionsocial.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/orionsocial.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/orionsocial.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/orionsocial.com\/wp-json\/wp\/v2\/comments?post=1167"}],"version-history":[{"count":4,"href":"https:\/\/orionsocial.com\/wp-json\/wp\/v2\/posts\/1167\/revisions"}],"predecessor-version":[{"id":1203,"href":"https:\/\/orionsocial.com\/wp-json\/wp\/v2\/posts\/1167\/revisions\/1203"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/orionsocial.com\/wp-json\/wp\/v2\/media\/1189"}],"wp:attachment":[{"href":"https:\/\/orionsocial.com\/wp-json\/wp\/v2\/media?parent=1167"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/orionsocial.com\/wp-json\/wp\/v2\/categories?post=1167"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/orionsocial.com\/wp-json\/wp\/v2\/tags?post=1167"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}