{"id":110,"date":"2011-11-20T17:33:08","date_gmt":"2011-11-20T22:33:08","guid":{"rendered":"https:\/\/targetmarketingohio.com\/blog\/?p=110"},"modified":"2016-06-17T05:45:20","modified_gmt":"2016-06-17T05:45:20","slug":"301-redirect-how-to-keep-your-google-rankings-html-to-php","status":"publish","type":"post","link":"https:\/\/www.targetmarketingohio.com\/blog\/301-redirect-how-to-keep-your-google-rankings-html-to-php\/","title":{"rendered":"301 Redirect &#8211; How to Keep Your Google Rankings Going From html to php"},"content":{"rendered":"<div class=\"big-txt\">The Critical 301 Redirect\u00a0<\/div>\n<p><em>The 301 redirect is the most efficient and\u00a0SEO-friendly method for website page redirection. It&#8217;s the simplest method, not that hard to implement, and it should preserve your valuable search engine results page\u00a0rankings for all of your website urls. \u00a0If you have to change file names or move pages around, it&#8217;s the safest option. The code &#8220;301&#8221; is interpreted by the search engine indexing spiders as the page has moved permanently.<\/em><\/p>\n<p>This is a common problem for many companies going from a radically different new website structure.\u00a0 Many of our company&#8217;s website pages had page one ranking on Google, Yahoo, and Bing for many keyword phrases having to do with SEO, pay per click, and website development in our targeted regional market\u00a0before the advent of our new website. When our company converted all of our website urls from .html to .php on the new site, we were a bit concerned that somehow Google would\u00a0not find or not correctly identify what new pages\u00a0corresponded to the old pages thereby lowering our precious Google rankings for\u00a0all pages and hurting the new\u00a0business leads\u00a0that we receive from the Internet.\u00a0<\/p>\n<p>The problem was solved by using\u00a0a 301 redirect for each page of the old site\u00a0in conjunction with a .htaccess file placed at the root level of our server.<\/p>\n<p><strong>Note:<\/strong> This type of 301 redirect applies\u00a0only for page conversions going from html to php or html to html.<\/p>\n<p>First, create the .htaccess file.\u00a0 What is the .htaccess file?\u00a0An htaccess file is a simple ASCII file, such as you would create through a text editor like NotePad or SimpleText. It&#8217;s a web server configuration file that is used to control the behavior, security, and performance of a site.\u00a0 Most webmasters create .htaccess file and use this file to control their sites and communication with search engine spiders.<\/p>\n<p>Open up a text editor and save as &#8220;.htaccess&#8221;.\u00a0<\/p>\n<p>The following is the 301 redirect command that should be placed in the .htaccess file. to match old page to new page:<\/p>\n<p>Redirect 301 \/old-url.html <a href=\"http:\/\/www.your-site.com\/new-page.php\">http:\/\/www.your-site.com\/new-url.php<\/a>\u00a0<\/p>\n<p>You will have a 301 redirect line of code\u00a0for each\u00a0old url that you want to redirect to its new url\u00a0in the .htaccess file.<\/p>\n<p>A quick way for websites under 500 pages\u00a0to get all of the urls concerned in this process of\u00a0matching old pages to new pages is to use this <a title=\"Free XML Sitemap Generator\" href=\"http:\/\/www.xml-sitemaps.com\/\" target=\"_blank\">free\u00a0xml sitemap tool <\/a>on both the old and new sites,\u00a0extracting the xml operators, copying and pasting into a spreadsheet, matching the old to new pages, then adding &#8220;Redirect 301&#8221; to the beginning of each cell.\u00a0 This sitemap generator is great for use with Google Webmaster Tools, also, to\u00a0communicate all of your website pages directly to Google.<\/p>\n<p>Then\u00a0upload the .htaccess file to the root level of your server.<\/p>\n<p>One final step. \u00a0You&#8217;ll we need to instruct the server that\u00a0<strong>mod_rewrite<\/strong> is one of the rules to initiate to execute .htaccess.<\/p>\n<p><a href=\"http:\/\/httpd.apache.org\/docs\/current\/mod\/mod_rewrite.html\">http:\/\/httpd.apache.org\/docs\/current\/mod\/mod_rewrite.html<\/a><\/p>\n<p><em>The <code><a href=\"http:\/\/httpd.apache.org\/docs\/current\/mod\/mod_rewrite.html\">mod_rewrite<\/a><\/code> module uses a rule-based rewriting engine, based on a regular-expression parser, to rewrite requested URLs on the fly. By default, <code><a href=\"http:\/\/httpd.apache.org\/docs\/current\/mod\/mod_rewrite.html\">mod_rewrite<\/a><\/code> maps a URL to a filesystem path. However, it can also be used to redirect one URL to another URL, or to invoke an internal proxy fetch.<\/em><\/p>\n<p><em><code><a href=\"http:\/\/httpd.apache.org\/docs\/current\/mod\/mod_rewrite.html\">mod_rewrite<\/a><\/code> provides a flexible and powerful way to manipulate URLs using an unlimited number of rules. Each rule can have an unlimited number of attached rule conditions, to allow you to rewrite URL based on server variables, environment variables, HTTP headers, or time stamps.<\/em><\/p>\n<p><em><code><a href=\"http:\/\/httpd.apache.org\/docs\/current\/mod\/mod_rewrite.html\">mod_rewrite<\/a><\/code> operates on the full URL path, including the path-info section. A rewrite rule can be invoked in <code>httpd.conf<\/code> or in <code>.htaccess<\/code>. The path generated by a rewrite rule can include a query string, or can lead to internal sub-processing, external request redirection, or internal proxy throughput.<\/em><\/p>\n<p>Helpful information for:<\/p>\n<p class=\"nopad\">How to retain your Google rankings when your website urls change. How to not lose your website rankings or keyword rankings\u00a0on the search engines. 301 redirect. .htaccess and 301 redirect. How to redirect pages to keep your rankings on Google. How to keep your Google rankings. html to php redirection. xml sitemap.<\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"big-txt\">The Critical 301 Redirect <\/div>\n<p><em>The 301 redirect is the most efficient and SEO-friendly method for website page redirection. It&#8217;s the simplest method, not that hard to implement, and it should preserve your valuable search engine results page rankings for all of your website urls.  If you have to change file names or move pages around, it&#8217;s the safest option. The code &#8220;301&#8221; is interpreted by the search engine indexing spiders as the page has moved permanently.<\/em><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[16,17,92],"class_list":["post-110","post","type-post","status-publish","format-standard","hentry","category-keeping-your-google-rankings","tag-htaccess","tag-301-redirect","tag-how-to-keep-your-google-rankings"],"_links":{"self":[{"href":"https:\/\/www.targetmarketingohio.com\/blog\/wp-json\/wp\/v2\/posts\/110","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.targetmarketingohio.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.targetmarketingohio.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.targetmarketingohio.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.targetmarketingohio.com\/blog\/wp-json\/wp\/v2\/comments?post=110"}],"version-history":[{"count":3,"href":"https:\/\/www.targetmarketingohio.com\/blog\/wp-json\/wp\/v2\/posts\/110\/revisions"}],"predecessor-version":[{"id":740,"href":"https:\/\/www.targetmarketingohio.com\/blog\/wp-json\/wp\/v2\/posts\/110\/revisions\/740"}],"wp:attachment":[{"href":"https:\/\/www.targetmarketingohio.com\/blog\/wp-json\/wp\/v2\/media?parent=110"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.targetmarketingohio.com\/blog\/wp-json\/wp\/v2\/categories?post=110"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.targetmarketingohio.com\/blog\/wp-json\/wp\/v2\/tags?post=110"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}