php, html and file extensions in browsers

by 5 replies
6
From what I've noticed, SEO-optimized websites generally like having .html or .php files to the SEO'd pages on their site. Is there really any difference if you use that method, or is having it set up where it has something like page.php?I'd=1244 ???

I'm not sure how much more search engines will like it if you use regular .php or html file extensions.

Or maybe it's that people are more likely to click on the .html and .php pages that they see listed in google and not the page.php?I'd=1244 ones?
#programming #browsers #extensions #file #html #php
  • Generally, you want to avoid using GET data wherever possible (e.g. somesite.com/page.php?id=1234). You'd do a lot better in most search engines if you used a rewrite rule to change that to something like somesite.com/pages/1234. A sample rewrite rule (in .htaccess) might look like:

    RewriteRule ^(pages/[0-9]+)$ /page.php?id=$1 [L]

    Or, better still, you could replace the ID with a more meaningful slug, e.g. somesite.com/pages/seo-tips-and-tricks.
    • [1] reply
    • Regarding extensions, I have never noticed a difference.... using html, htm, php, asp, aspx... i wouldn't say one ranks better.
      • [1] reply
  • Passing variables through your URL can indeed be bad.

    File extension definitely do not play a role in SERP preference!

Next Topics on Trending Feed

  • 6

    From what I've noticed, SEO-optimized websites generally like having .html or .php files to the SEO'd pages on their site. Is there really any difference if you use that method, or is having it set up where it has something like page.php?I'd=1244 ??? I'm not sure how much more search engines will like it if you use regular .php or html file extensions.