URL with no extension, .htm extension or .php extension? (.htaccess Mod ReWrite)


I am changing a web site from HTML and CSS to a new site using MySQL Database, PHP, HTML and CSS.

The links on the old site are like: [noparse]www.site.com/iphone.htm[/noparse]

I am not sure what to use for the links on the new web site. I want them to be Search Engine Friendly. What is best from these:

  1. [noparse]www.site.com/iphone[/noparse]
  2. [noparse]www.site.com/iphone.htm[/noparse]
  3. [noparse]www.site.com/iphone.php[/noparse]

I am using a Mod ReWrite and I think 1. is best. But what do search engines think of it? do search engines think 'this is not a standard .htm file so it must be a mod rewrite and therefore it will be ranked lower.

Does anyone have experience with making this choice in terms of search engine rankings?



The good news is that search engines really couldn’t care less what extension you use for your pages or if you use one at all.

(1) may be easiest for people to type in, but if possible you should ensure that it works if they include a trailing slash on the end, otherwise some people (or CMSs) may get confused by a URL that looks like it needs that final slash but doesn’t have it.

(2) nothing wrong with sticking with what you’ve already got, it’s a perfectly sensible format, and means you’re unlikely to see any temporary drop at all in Google, which is always a danger if you change.

(3) is one that I would avoid - always try to avoid tying your URL/filename to the technology used. You might one day want to switch from PHP to something else, at which point you’ll wish you hadn’t called it file.php

[ot]It’s helpful, when you’re giving dummy/example URLs, if you can stop them from becoming actual links. It happens automatically any time you start with http: or www., but if you un-tick “Automatically parse links in text” below the message then it isn’t automatically linkified. If you don’t do that, we end up with loads of outbound links to sites and pages that don’t exist, which isn’t too good.