I'm having one of my sites redesigned at the moment and, basically, all the internal page names have changed from /somepage.htm to /somepage.php. I know I can easily change them back to look like they have a .htm extension by using a mod rewite. However, do I then need to redirect all the original .htm pages in some way to preserve the page rank and incoming links they had or will that not be necessary?
I have done the same thing two months ago and page rank and ranking remained same. Thus I guess there is no need to 301 just my 2c
I had always thought you had to 301 as that would make sense. But recently I did a Mod-ReWrite on an old site and everything stayed the same. Google indexed the new pages with no loss of rankings or PR. I wonder if its because the old pages are still technically there. All SEO advice would say you have to 301 them to avoid duplicate content and loss of rankings/pr but my experience has been different. Would love to hear more opinions on this.
If the old pages will contain the same content, I would recommend doing a 301. I had a serious issue with this...
Can you go intio a little more detail as to what happened. By the way, when you do a ModRewrite the old pages ARE the new pages which means of course they are the same. you are technically only creating an alternate url, not creating a new page.
Ok, I'm having trouble getting my head round this.... I will be uploading new pages as they end in the .php extension. As they are, other than the design change, showing the same content, I was then going to delete the old .htm pages. Following this, I will mod rewrite the new pages so that their URLs look like their old .htm equivalents. Is this the correct proceedure?
Yes. That way, as far as any visitors, including spiders, are concerned, they will request page.htm and they will get page.htm -- which of course is actually page.php but no one will know that but you (well, and now us I guess...)
It sounds like all you want to do is to use mod_rewrite to pull /somepage.php when /somepage.htm is invoked? PR will stay the same as Google does not know that it's actually indirectly invoking /somepage.php, I believe. You are not changing URLs and links to them so there is no need for 301 redirects. And it's actually considered to be a good practice to hide ANY underlying technology or framework you decide to use tomorrow (.php, .aspx, etc) by .htm extension. This way you don't have to deal with redirects/PR issues and your environment is more secure since hackers don't see what technologies are used for processing
Yes, that's correct, but of course you need to also make sure that any in-site links you generate in your PHP code reference .htm instead of .php, to stay consistent and avoid duplicate URLs. If you do all this, then as others've said, for search engines your site URLs will look exactly the same as they used to. BTW, if you ever do need or decide to change the file extension, I'd either get rid of it totally (unless you specifically want to imitate an all-static site) or at least change from .htm to .html, which IMHO looks much more professional (as the only reason for the .htm extension was the ancient DOS-derived 8.3 filename restriction, so .htm carries a negative "FrontPage connotation" at least to techies like myself.)
lol, I didn't even realise there was a difference when I first started the site, just went for .htm as it was once less character to type everytime!
There's indeed no technical difference. It's another matter whether and how widespread the meme I expressed is It's likely to be shared among people coming from a background other than DOS/Windows (such as Unix systems, where there haven't been any 8.3 filename restrictions), with a strong technical skillset (i.e. programming), and inbred antipathy for dumbed-down inferior technology. In other words, primarily the elitist coder nerds such as myself (or if it helps you recognize them, the people who have a strong and vicious anti-Microsoft streak, will advocate using Linux / Mac OS X instead of Windows, etc, ad nauseam). Since, as said, there is no difference from a practical perspective, whether you care about this issue at all depends how large a fraction of your visitors you expect to consist of the above crowd and to have been infected by this meme. Can't help you there. But unless you feel part of the group described above, saying that this meme, this opinion, simply doesn't exist and isn't out there, well, reality bites and you obviously haven't spent time inside the head of an elitist coder nerd. And if you do feel like an elitist coder nerd and can't imagine any other elitist coder nerds thinking like this , hey, you're less elitist than you like to think (maybe you haven't used other platforms than Windows?). For me, visiting a site that has file names ending with .htm screams out at me somewhat in the same way a grammar error stands out from text. Again, there is no difference, one way or the other, so just go with .html and don't worry about it
But that's a reflection of a personal quirk and nothing else. If you think about it, most other filename extensions on the net are 3 letters not 4: .php, .asp. .cfm, .pdf, etc. Even domain names use 3 letter extensions: .com, .net. org -- as well as 2 letter and 4 letter extensions like .ca, .de, .info, etc. There's nothing more professional about a 4 letter extension any more than there is anything less professional about a 2 letter extension. And it really doesn't have a whole lot to do with DOS. So just go with .htm and don't worry about it
I'd also add that the choice may be in part server dependent. When I first began my main site, the default "home page" on the server was index.htm so that's what I used -- for consistency, I used .htm for all the other pages in the site. Later I changed to a server where the default was index.html and decided for several reasons to change the home page to that with a 301 redirect for anyone linking to index.htm -- for simplicity, I left the remaining pages as .htm.
I won't dispute that. I simply hold that it's a more widespread opinion than you think. For instance, let's say I got on my soapbox (again ) and started advocating ditching Windows right this instant and putting Linux on every PC in the world You might very well not agree with me at all about the merits or sensibility of the above argument (especially if you're part of the "mainstream" computer users), but surely you wouldn't claim that the opinion I'm advocating isn't immensely widespread (though by no means universally held) in technical circles; at least you wouldn't, if you talk with programmers on a regular basis and have a good reading of the "pulse" of the professional computer geek/nerd community (say, as somewhat represented by the readership of Slashdot). But that's the whole point. File endings are three letters precisely and because Windows dominates the computing industry, and it owes its ancestry to MS-DOS which had some unpleasant restrictions on file names and thus established the 8.3 convention and ensured its survival and dominance well beyond the point that it still restricted people (post-Windows 95, mostly). Sorry, I really do have to disagree with you, because the only reason the .htm file extension even exists is due to Windows (and FrontPage, IIS, and crappy FTP programs). That's not an opinion, it's a fact. There actually are loads of file extensions longer than 3 letters, but they're probably not obvious to the "mainstream" computer user. For instance, JPEG pictures and MPEG movie clips have commonly been represented by the .jpeg and .mpeg extensions on professional Unix workstations (and a lesser degree, the Macintosh); the more widespread .jpg and .mpg are entirely due to the influence of MS-DOS and Windows. Another example: as any Java programmer knows, Java source files are named with the suffix .java and the resulting binaries with .class, to quote just one example from the programming world. If Java had arrived on the scene some years before 1995, the established extensions would, no doubt, have become .jav and .cls. It's all about history and ancient restrictions that are no longer useful and thus shouldn't be slavishly followed. (The domain suffixes don't enter into this; AFAIK they have nothing to do with file extensions and there were never any restrictions on their length in the first place.) Sorry for the overlong response and hijacking the thread with this tiny matter...