Warrior Forum - The #1 Digital Marketing Forum & Marketplace

Warrior Forum - The #1 Digital Marketing Forum & Marketplace (https://www.warriorforum.com/)
-   Programming (https://www.warriorforum.com/programming/)
-   -   php, html and file extensions in browsers (https://www.warriorforum.com/programming/290226-php-html-file-extensions-browsers.html)

krull 21st November 2010 01:02 PM

php, html and file extensions in browsers
 
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?

bort27 21st November 2010 01:15 PM

Re: php, html and file extensions in browsers
 
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.

CarloD. 21st November 2010 01:58 PM

Re: php, html and file extensions in browsers
 
Regarding extensions, I have never noticed a difference.... using html, htm, php, asp, aspx... i wouldn't say one ranks better.

krull 21st November 2010 05:49 PM

Re: php, html and file extensions in browsers
 
I meant with something that uses an = sign in it with an id number. Should I stay away from using that? That's what I've always thought and I just want confirmation on that :)

SteveJohnson 21st November 2010 07:20 PM

Re: php, html and file extensions in browsers
 
Quote:

Originally Posted by krull (Post 2900857)
I meant with something that uses an = sign in it with an id number. Should I stay away from using that? That's what I've always thought and I just want confirmation on that :)

Yes, you should avoid that if at all possible.

orvn 21st November 2010 10:18 PM

Re: php, html and file extensions in browsers
 
Passing variables through your URL can indeed be bad.

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


All times are GMT -6. The time now is 07:30 PM.