Changing website platform html to php

2 replies
  • SEO
  • |
I have a website which is in html but for some reason now I want to create new website in php with same domain name. I will keep url same but extension will change. So will it affect my seo and if yes what is solution. Can we use 301 redirect, I want to take visitor on my new page. Even if its on internal page, I should be able to take them on relevant internal page only not on home page.
#changing #html #php #platform #website
  • Profile picture of the author seopratyush
    Yes. If you change the file extension of a live site the following consequences will occur:

    You are essentially changing the URLs and making all of your pages look like new pages to the search engines.
    Any links you had to those pages will essentially be lost
    You will need to have the search engines re-index every page that has the new extension
    While the search engines make the transition from your old URLs to your new URLs anyone who finds your site in the search results will be greeted with a 404 error on your website
    Anyone who had your pages bookmarked will no longer be able to find those pages (until they update their bookmarks)
    Fortunately all this is easy to solve. You can do a 301 redirect from the old URLs to the new URLs. This is very easy if the file names are staying the same and only the file extensions are changing. To do the 301 redirect for your pages just create a file called .htaccess and place it in your root directory. Place this inside of it:

    RewriteEngine on
    RewriteRule (.*)\.htm$ /$1.php [R=301,L]

    What this does is tell the search engines, and web browsers, that your pages have moved and where to find them (it tells them that the pages that ended with .htm now end with .php). The search engines will then update their indexes with the new pages and also credit whatever links you have to the old URLs to the new URLs (although a small amount of those links' value is lost). Web browser will automatically redirect the user to the new page and they won't even know it happened.

    FYI, file extension does not affect your rankings. In other words, .php is not better or worse then .html or .aspx, etc. (Actually if someone is searching for "php" you'll notice Google will highlight the file extension in the search results. But if this is a factor in their rankings it probably is a small one).

    Originally Posted by abhijit12a View Post

    I have a website which is in html but for some reason now I want to create new website in php with same domain name. I will keep url same but extension will change. So will it affect my seo and if yes what is solution. Can we use 301 redirect, I want to take visitor on my new page. Even if its on internal page, I should be able to take them on relevant internal page only not on home page.
    {{ DiscussionBoard.errors[9395832].message }}
  • Profile picture of the author mkgg
    Not if you do proper redirecting (301), you will lose some backlinks juice but its negligible.

    Just name the new php files the same and use htaccess to redirect the html files to php (google for a code, not a hard code) or just ask and i'll post.
    {{ DiscussionBoard.errors[9395834].message }}

Trending Topics