Simple Machines Community Forum

SMF Development => Feature Requests => Applied or Declined Requests => Topic started by: Derine on December 15, 2005, 06:51:42 PM

Title: Truly search-engine friendly urls.
Post by: Derine on December 15, 2005, 06:51:42 PM
If you look at the format of the urls on this forum (http://forums.vsociety.net/), you'll see that the board urls are all of the form:

http://forums.vsociety.net/board/89.0

And topic urls are all of the form:

http://forums.vsociety.net/topic/4867.0

I think this is a clean and preferrable form for urls, and I think it should be included as an option.  To get this to work, I had to manually edit BoardIndex.php and MessageIndex.php, and replace all occurrences of ?board= and ?topic= with /board/ and /topic/, while also removing the $scripturl variable from those locations.  It should not be too difficult to make such a replacement into a selectable option.

The .htaccess file to make this work looks like:

RewriteEngine on
RewriteRule ^board/(.*) http://forums.vsociety.net/index.php?board=$1 [L,QSA]
RewriteRule ^topic/(.*) http://forums.vsociety.net/index.php?topic=$1 [L,QSA]
Title: Re: Truly search-engine friendly urls.
Post by: Max22 on August 28, 2008, 09:19:16 PM
This solution works for me... but the seo friendly url will only show on status bar when I hover on a link (not on address bar).
My host runs PHP as CGI.

I tried this code by Daniel15:

http://www.simplemachines.org/community/index.php?topic=124284.msg794689#msg794689

but I want to adapt it with this type of paths:

http://www.mysite.com/forum/board/89.0
http://www.mysite.com/forum/topic/4867.0

Help me, thank you.
Title: Re: Truly search-engine friendly urls.
Post by: Nathaniel on August 29, 2008, 02:28:21 AM
There are a number of options for SEO friendly urls with SMF.

You could use the internal setting called "Search engine friendly URLs" in the admin area under "Features and Options".

You could also use the Pretty URLs (http://custom.simplemachines.org/mods/index.php?mod=636) mod.
Title: Re: Truly search-engine friendly urls.
Post by: 青山 素子 on August 29, 2008, 03:40:26 AM
Please note that "Friendly URLs" aren't actually needed. Search engines today (and for the past several years) have been able to index dynamic pages with parameters just fine. Switching to a different way to display a number won't do anything but add complexity to your forum configuration, damage the ranking of your site by forcing it to be re-indexed and treated as new pages, and add load to the server.
Title: Re: Truly search-engine friendly urls.
Post by: Max22 on August 31, 2008, 06:29:29 AM
Quote from: Motoko-chan on August 29, 2008, 03:40:26 AM
Please note that "Friendly URLs" aren't actually needed. Search engines today (and for the past several years) have been able to index dynamic pages with parameters just fine. Switching to a different way to display a number won't do anything but add complexity to your forum configuration, damage the ranking of your site by forcing it to be re-indexed and treated as new pages, and add load to the server.

It's not true in my case... I've a site with 300 visits by day and my forum links are not indexed as well.

However now I applied my SEO links without too many complication.
Title: Re: Truly search-engine friendly urls.
Post by: karlbenson on August 31, 2008, 07:10:16 AM
Actually it is the case.

If your links aren't well indexed, it won't be down to the format of links, but likely down to something else
- low Pagerank?
- low no. of backlinks?
- low quality of content?
- rss/feedposted/copied content?
Title: Re: Truly search-engine friendly urls.
Post by: Deprecated on August 31, 2008, 08:52:23 AM
Quote from: Motoko-chan on August 29, 2008, 03:40:26 AM
Please note that "Friendly URLs" aren't actually needed. Search engines today (and for the past several years) have been able to index dynamic pages with parameters just fine. Switching to a different way to display a number won't do anything but add complexity to your forum configuration, damage the ranking of your site by forcing it to be re-indexed and treated as new pages, and add load to the server.

I agree with Motoko-san and Karl here. First of all, your boards aren't going to be indexed anyway, or if they are the indexed boards are useless. Second, putting your topics into URLs like /topic/12345.0 isn't any more friendly to search engines than the ?topic=12345.0 form because so many sites use dynamically generated URLs the search engines were forced to learn how to deal with this format.

I'm willing to concede that having URLs in the form simplemachines.org/community/Truly_search-engine_friendly_urls.htm might be some small advantage for SEs, or possibly the same with %20 instead of underlines, but your /topic/12345.0 isn't going to help you at all because there is no more or less information there than the other format.

It can be fun to code this stuff up though. I coded my whole cooking vanity website to use dynamic page generation, then turned all the links into what appear to be plain English descriptive titles and directory names, e.g. www.example.com/recipes/Chicken%Enchiladas.html, which then gets turned into a ?recipe= format by my rewrite engine, and then my index.php generates the code on the fly. I did it this way because it was fun to code it up and get it working, not because there was any other particular advantage to do it.

I think the best way to get your site indexed is to get a sitemap and do whatever you can to encourage the SEs to visit your site. If you want to mess with your URLs to have fun there's no reason to not do it, but you're not going to accomplish anything that will increase your ranking.
Title: Re: Truly search-engine friendly urls.
Post by: Max22 on August 31, 2008, 09:28:20 AM
I've a site with high quality of content, with rss included and a lo-fi version... I don't know my pagerank.

There is some problem to index forum topics... while the internal cms has not problems.

I found an alternative way to use .html extension modding some files, now my SEO links are in this format:

http://www.mysite.com/forum/index.php/board,7.0.html
http://www.mysite.com/forum/index.php/topic,4914.0.html

Pagerank would increase with this type of format...

Now it's necessary a bit of time I suppose... I think to have understood my problem, google doesn't recognize forum urls because before I had SMF4SEO installed, now removed on my server.

Latest crawling of Googlebot is happened 22-24 August... in that period I was trying different mods.
Title: Re: Truly search-engine friendly urls.
Post by: karlbenson on August 31, 2008, 10:07:45 AM
Everytime you change the format of your urls, there will be a negative seo effect.
This whether you enable or disable or alter the format of urls.

This is because search engines either
- detect the new vs old form as duplicate content
- the search engines start dumping your old urls, but not necessarily replacing the new ones
- all pagerank to those urls is lost unless you redirect to pass the pagerank.

It can last for months until your pagerank, recovers.

This is why although search engine friendly urls are commonly recommended, but not that much for existing indexed sites (unless your willing to take the hit in the short term)


Title: Re: Truly search-engine friendly urls.
Post by: 青山 素子 on August 31, 2008, 01:19:00 PM
Quote from: Max22 on August 31, 2008, 09:28:20 AM
Pagerank would increase with this type of format...

PageRank has absolutely nothing to do with the format of your links. It is determined mainly by the number of links to that page, and the rank of the pages that are linking to you. In fact, changing the format of the links will lose PageRank because you just lost all the incoming links.


Quote from: karlbenson on August 31, 2008, 10:07:45 AM
This is why although search engine friendly urls are commonly recommended, but not that much for existing indexed sites (unless your willing to take the hit in the short term)

I don't recommend "friendly" URLs in general unless there is a human usability reason. Given that most of the "friendly" URLs are more complicated to remember (topic 30456 versus Help_I_cant_tie_my_shoes_without_a_tiemaster), it would have to be some really good justification.