David on 6/4/2007 at 16:52
Just wondering if anyone has any thoughts or ideas regarding so called 'search engine friendly urls'.
I've just converted an eCommerce site I wrote to use such URLs and it seems to have got a boost from the Big Three search engines.
For anyone who doesn't know what these 'friendly urls are' are:
Instead of links looking like this:
[noparse]http://www.ttlg.com/forums/showthread.php?t=113118[/noparse]
They look like this:
[noparse]http://www.ttlg.com/forums/t113118-livin-up-to-my-nick-a-bit.html[/noparse]
Or at least something like that.
The theory is that search engines give the threads a boost because keywords exist in the URL.
I am currently debating whether it would be worth converting the forums to such a format. Most of it is fairly easy, but working out the paging and highlighting etc would be quite tricky.
So, any ideas or opinions?
Nameless Voice on 6/4/2007 at 17:28
I'm assuming that the old URL style would still work, and the extra text after the thread or post number would just be ignored?
I could see issues with old links otherwise, plus the URLs might start to get a bit too long?
Otherwise, it sounds like a good idea.
Vigil on 7/4/2007 at 14:03
I don't know what kind of URL-rewriting system you'd be using, but with mod_rewrite at least the additional query info (paging and highlighting) can just be left as a query - the rewrite rule can simply parse out the bits it needs, rewrite them into query strings, and then append any original query info.
In the case of pagination though, you'd be better to roll the page into the URL too. Something like:
http://www.ttlg.com/forums/threads/113118-livin-up-to-my-nick-a-bit/1/
If you use directory-style URLs like that instead of ones ending in a filetype (.html), you can tack on any additional "directory levels" without it looking weird.
Plus I think it would be clearer to use directories like "/threads/", "/posts/" etc. for specific kinds of URLs rather than prefixes like "t".
David on 7/4/2007 at 14:13
Yeah, it would be cleaner that way.
There are still some interesting things to consider, including sessions for non-cookied browsers etc.
Vigil on 7/4/2007 at 14:35
Is it really all or nothing with the URL rewriting? That can't just be handled as a regular query string like it usually is?
David on 7/4/2007 at 14:47
Yeah, it can be, however I think I have just solved that one too.
Obviously some things will be left as part of the query string.
Mortal Monkey on 7/4/2007 at 19:53
I thought we had enough [insert game here] sex already?
Seriously though, I'm very skeptical to this idea. It clutters up the URL.
If it was just the thread title in the URL, then it wouldn't be so bad. But having to type out both the ID, title and page number (which is wrong anyhow thanks to customizeable PPP, but that is besides the point), makes that rare time when copy-pasting doesn't actually work a bit of a bitch.
Add query strings to that and I'm just about to give up.
Vigil on 7/4/2007 at 20:30
What about when the title is ignored (so you can just specify the ID) and the page number is optional anyway? Ideally, something like http://www.ttlg.com/forums/threads/113118/ should work just fine.
Mortal Monkey on 8/4/2007 at 13:34
That's better. Perhaps even http://www.ttlg.com/forums/113118/, "threads" is a bit redundant since there's not much else on this forum.
Vigil on 8/4/2007 at 14:07
There's also individual posts, so you need to be able to distinguish between a post ID and a thread ID. However you're right, threads may as well be assumed as the default.