View Full Version : php vs html for seo
NoahM
07-16-2008, 02:32 AM
A friend recently hired someone to do seo and he came to me with a question regarding a recommendation/requirement put out by this "seo" specialist.
The claim is that my friend needs to have his site re-written in flat html instead of the current php site. The current site does not utilize a DB but rather uses includes and other simple php code. While I realize that the url is important for seo, I cannot believe that the following php url would rank any higher than the html equivalent, all other things being equal:
www.example.com/coolest_widget_ever.php
www.example.com/coolest_widget_ever.html
Can anyone confirm or debunk this with any certainty?
TIA
Kevin
07-16-2008, 12:29 PM
If that is true it would surprise me but then I am not a SEO expert.
However, I always suggest making all pages index.whatever files within unique directory names. IOW, you would use www.example.com/coolest_widget_ever/index.php Of course since the web server automatically looks for an index file within directories the real URL would simply be www.example.com/coolest_widget_ever. The advantage there is that if someday you wanted to make it a .html or a .cgi or whatever else the URL would not change and old references to it (like from the search engines) would still work.
Noah,
I have had good SEO success using the method Kevin suggested and it would render the server-side language irrelevant (I would do this long before making all of the pages static). You could set up .html to be interpreted as a .php file, but that is frowned upon here.
-Matt
Jarrod
07-16-2008, 02:32 PM
Again another person who's not an "seo" expert but having worked with enough of them recently it's certainly not something they've suggested to any customers. You might also find this blog posting on extensions (http://www.mattcutts.com/blog/dont-end-your-urls-with-exe/) by Matt Cutts of Google where he specifically states they don't care what the extension is, unless you use something like .exe.
NoahM
07-17-2008, 12:15 AM
I had a feeling the response would be along these line. It is just hard for me to believe that someone puts themselves out as an SEO expert and then makes blanket statements that don't seem to hold up.
Thanks for all of the input. I will likely point my friend to this thread and recommend he take the suggestions about separate directories for index files. One interesting thing in the ensuing discussion below the Matt Cutts post was the part about ensuring URLs use a trailing /
georgeek
07-18-2008, 06:51 AM
I cannot believe that the following php url would rank any higher than the html equivalent, all other things being equal:
www.example.com/coolest_widget_ever.php
www.example.com/coolest_widget_ever.html
Can anyone confirm or debunk this with any certainty?
Debunked with certainty :) However all the examples in this thread use underscores between words and that does make a difference. Google cannot index individual words in the url if they are concatenated or separated by an underscore.
www.example.com/coolest-widget-ever.php is better.
- George
NoahM
07-18-2008, 09:51 PM
Debunked with certainty :) However all the examples in this thread use underscores between words and that does make a difference. Google cannot index individual words in the url if they are concatenated or separated by an underscore.
www.example.com/coolest-widget-ever.php is better.
- George
Thanks for the input, but to keep with the theme of the the earlier post regarding a statement by Matt Cutts this CNET article (http://news.cnet.com/8301-10784_3-9748779-7.html?tag=head) makes me think that used to be the case but has since been update. I would have been a bit surprised to learn that Google cannot handle underscores as word separators.
Interestingly the same article states that URLs with query strings are not penalized either.
Put another way, you won't take a hit in your Google rankings if you have a question mark in your URL; just don't have more than two or three equals signs in the URL.
That is the crux of what got my friend into this whole discussion of rewriting the site to remove query strings. Apparently it is another thing that the SEO guy is at least partially incorrect about.
georgeek
07-19-2008, 11:41 AM
I would have been a bit surprised to learn that Google cannot handle underscores as word separators..Google haven't been able to index on words in a url separated by underscores for the last 12 years. Matt Cutts is not always correct in every detail (he has his own and Google's agenda).
I run a large number of test sites (some of them here at FQ) for the sole purpose of having definitive answers to these important questions. Google is not currently doing what Matt Cutts said they would do in the near future.
The best SEO's know this and some like Michael Duz are even prepared to write about it, see his posts Keywords in Urls (http://www.seo-blog.com/keywords-in-urls.php) and URLs (Update) (http://www.seo-blog.com/url-update.php). Although over two years old the Google findings are still valid, compare this (http://www.google.com/search?q=%22please+go+to+keywords+in+urls%22&num=100&hl=en&filter=0) with this (http://www.google.com/search?num=100&hl=en&q=%22please+go+to+keywords+in+urls%22+callipygian&btnG=Search).
Interestingly the same article states that URLs with query strings are not penalized either.Correct.
- George
NoahM
07-19-2008, 02:00 PM
Thanks for the additional info. I will certainly point this out to my friend. Since he is going to re-write the site anyway he could just as easily use hyphens instead of underscores.
Wassercrats
07-19-2008, 03:13 PM
Since he is going to re-write the site anyway he could just as easily use hyphens instead of underscores.Matt Cutts suggested that be done for new sites even though he said it's not worth changing old ones. I didn't read anything anyone linked to in this thread though.
Google haven't been able to index on words in a url separated by underscores for the last 12 years.
- George
I will take your word on this; there must be some reason they don't want to consider the underscore as a space, but for the life of me I can't think of one? I'm just curious as it's plenty easy to use - instead of _, but why would google want to separate words by - and not by _. If anything, it would see more logical the other way... any speculation?
georgeek
07-21-2008, 05:25 PM
...there must be some reason...any speculation?It's probably historical because a hyphen has always been regarded as a legitimate word separator in many languages but an underscore has not. Matt Cutts says it was because someone searching for ftp_upload for example does not want to see the results for ftp upload and visa versa.
- George
Yes, I guess I always thought of a hyphen as a "word combiner" where it links two related words that aren't a single word so I had trouble thinking of it as a word "separator" when I posted, but actually what we're talking about is a "word combiner" of sorts. Plus I guess the TLD convention of allowing a hyphen in the domain itself provides a precedent.
P.S. and thanks --I was actually using an _ for years thinking of it as a space replacement for non-naturally-hyphenated words until I read your tip a while back in another thread -- much appreciated.
vBulletin® v3.6.8, Copyright ©2000-2009, Jelsoft Enterprises Ltd.