.html Versus .php for SEO
I was asked the other day if search engines favor a .html file extension versus a .php file extension? The answer I gave the client was no, it makes no difference, search engines will index pages with both file extensions the same, but there are some things that can make a difference. If you are using a GET query string on the .php page then the Google Webmaster Guidelines suggests that the parameters should be kept short and limit the number. I suggest no more than three, but some people say up to five is fine. It is also suggested to keep session ids out of the URL.
If people are serious about not using a .php file extension, there are other solutions. If you are just using php to template your website, you can just process .html as .php.
Categories: seo
Comments
Alicia
Thanks, this is the answer to my question. Thanks for sharing your knowledge.<br/><br/>Alicia
LGR
Your welcome Alicia. I am glad you found it useful.
Lino Almojuela
Ive been looking around looking for an answer which is better extension for SEO specially Google and I found your answer really helpful. Thank you very much.
Chad Walls
Thanks for this post! I still personally believe that .html is the best for SEO. A new website I am bulding requires a database it is nice to read that using .php won't affect SEO.
LGR
You can still use .html even if the site is run in PHP. For example this site is run with WordPress but most of the posts use .html in the permalink. I did not do it for SEO but it was just easier since I moved the site from a Blogger blog at one time.