Forums

Unfortunately no one can be told what FluxBB is - you have to see it for yourself.

You are not logged in.

#1 2014-10-01 11:23:43

Franz
Lead developer
From: Germany
Registered: 2008-05-13
Posts: 6,047
Website

Pretty URLs in v2.0

To make this clear, I'm heavily against making pretty URLs configurable in the admin panel. That's a barely-needed feature, and if we can offer sensible defaults that work well for SEO etc., why change them? If need be, it will be possible for extensions to offer alternative routes etc.

So, the most important URLs will obviously be for categories, conversations and posts.

Right now, they look like this:

/categories/discussion/general/
/conversations/12345
/post/6789

I think it makes sense to have the subject in the URL for conversations, so that will be added. Since they are the central part of the forum, why not have URLs like /12345-topic-subject-here (an integer followed by any words) for conversations?

Thoughts? Ideas? How do others handle this? What's important in terms of SEO?

P.S.: Duplicate content will be taken care of using the canonical link tag.


fluxbb.de | develoPHP

"As code is more often read than written it's really important to write clean code."

Offline

#2 2014-10-01 11:58:37

chris98
Member
From: England, United Kingdom
Registered: 2013-05-31
Posts: 906
Website

Re: Pretty URLs in v2.0

To make this clear, I'm heavily against making pretty URLs configurable in the admin panel.

When I meant configurable, I meant you get to choose between a couple of pre-defined types of links, not create your own, for example:

topic/1234/
index.php/topic/123

While subjects do look good, I know myself how hard they are to maintain after doing it for my site downloads & articles. You have to validate the second parameter and if it doesn't match the original one, then throw a 404, redirect.etc.

In fact, I'm willing to share how I've done it:

It's all based on this function:

function replace_characters($string) 
{

	$replace = array('&', '&');
	$string = str_replace($replace, 'and', $string);

	$replace = str_split(' ."_/\\:~*+=%^|#!()@;$£`¬?{}[]');
	$with = '-';
	$string = str_replace('\'', '', $string);
	$string = str_replace($replace, '-', $string);

	$replace = '--';
	while(strpos($string, '--')!== false)
		$string = str_replace($replace, '-', $string);

	$string = strtolower($string);
	$string = trim($string, "-");
	
	return $string;
	
}

Basically, the GET parameter is checked against the one from the database (put through this function) and if it doesn't match, it either redirects to the URL it should be, or throws a 404 error.

It's probably not the best way to do it, but that's how I manage it. Obviously this requires a query of the database and possibly why my site takes quite a while to load (especially the homepage) which is why I believe it's more trouble than it's worth.

But, I'm pretty sure you will be able to come up with a more efficient way of doing it.

Offline

#3 2014-10-01 12:04:07

Franz
Lead developer
From: Germany
Registered: 2008-05-13
Posts: 6,047
Website

Re: Pretty URLs in v2.0

First off, the "index.php" part in the URL will actually be configurable (though not through the admin panel). That's for those who want pretty URLs, but do not want to (or cannot) use .htaccess URL rewriting.

Well, we do have to query the database anyway to display topic information. In fact, we won't have to validate anything, though, because we can just declare the correct URL using the previously mentioned canonical URL tag.

That means, both /7961-pretty-urls-in-v20 and /7961-i-tricked-you will point to the same topic, but only one will be indexed by search engines, and that's what matters in the end.


fluxbb.de | develoPHP

"As code is more often read than written it's really important to write clean code."

Offline

#4 2014-10-01 12:18:48

chris98
Member
From: England, United Kingdom
Registered: 2013-05-31
Posts: 906
Website

Re: Pretty URLs in v2.0

You are correct, that it only really matters that one will be indexed, but I do think that if it can be accessed with text that isn't necessarily the topic title of that thread, then there isn't really any point in having that extra information there - especially since it isn't required to display the topic and is just for show.

Offline

#5 2014-10-01 12:23:54

Franz
Lead developer
From: Germany
Registered: 2008-05-13
Posts: 6,047
Website

Re: Pretty URLs in v2.0

That depends on whether you think this kind of SEO is a valid concern or not.


fluxbb.de | develoPHP

"As code is more often read than written it's really important to write clean code."

Offline

#6 2014-10-01 17:38:58

Michael
Member
Registered: 2014-04-05
Posts: 35

Re: Pretty URLs in v2.0

From an SEO perspective it makes no matter.
To organize structure of the service(e.g. breadcrumbs), you should use microformats, microdata (such as schema.org) and meta tags such as <link rel = "canonical / next / prev" href = "XYZ/2">

Find out how they do it - vBulletin, IP.B, XenForo.

smile


PS Sorry for my English, it's not my mother tongue. I try to do my best, but I'm still making mistakes.

Offline

#7 2014-10-01 21:49:09

joel
Member
Registered: 2014-07-04
Posts: 400

Re: Pretty URLs in v2.0

vbulletin  seo friendly url is very long, .

If flux finally move to long seo friendly url, what will happen with the already url and google index links? Broken??

www.vbulletin.com/forum/forum/vbulletin-4/vbulletin-4-questions-problems-and-troubleshooting/4008761-changing-seo-friendly-url-s


Warning! be informed and be forewarned. <p>
<?php
I'm not a native English Man. So my comments might contain some grammatical explosive (ELD), missapropreation of words (dinamyt), The use of wrong words (missiles), & mis spelling of words (war drones). Any of the occurrence can cause havoc. So be warned
?>

Offline

#8 2014-10-02 09:34:59

Franz
Lead developer
From: Germany
Registered: 2008-05-13
Posts: 6,047
Website

Re: Pretty URLs in v2.0

Another relevant question: should URLs be hierarchical? If so, conversation URLs would look something like this:

/categories/general/news/conversations/12345-just-talking-about-stuff


fluxbb.de | develoPHP

"As code is more often read than written it's really important to write clean code."

Offline

#9 2014-10-02 09:43:15

seven
Member
From: Torino, Italy
Registered: 2010-08-19
Posts: 269
Website

Re: Pretty URLs in v2.0

Could this structure be better?

/category-name/forum-name/conversation-name#post-number

e.g.:

/general/news/just-talking-about-stuff#12345

Of course the beginning of the conversation would be: /general/news/just-talking-about-stuff

Last edited by seven (2014-10-02 09:43:59)


gamezoo.org - serious gaming services for serious gamers.

Offline

#10 2014-10-02 10:59:07

joel
Member
Registered: 2014-07-04
Posts: 400

Re: Pretty URLs in v2.0

seven wrote:

Could this structure be better?

/general/news/just-talking-about-stuff#12345

Of course the beginning of the conversation would be: /general/news/just-talking-about-stuff

not bad.

Last edited by joel (2014-10-02 11:08:50)


Warning! be informed and be forewarned. <p>
<?php
I'm not a native English Man. So my comments might contain some grammatical explosive (ELD), missapropreation of words (dinamyt), The use of wrong words (missiles), & mis spelling of words (war drones). Any of the occurrence can cause havoc. So be warned
?>

Offline

#11 2014-10-02 13:39:18

Sxderp
Member
Registered: 2012-11-02
Posts: 92

Re: Pretty URLs in v2.0

I'm in favor of short URLs all around. I find long 'content filled' URLs unpleasant. I also feel that they are a placebo in terms of seo.

Last edited by Sxderp (2014-10-02 13:40:17)

Offline

#12 2014-10-02 14:52:43

chris98
Member
From: England, United Kingdom
Registered: 2013-05-31
Posts: 906
Website

Offline

#13 2014-10-02 18:32:17

joel
Member
Registered: 2014-07-04
Posts: 400

Re: Pretty URLs in v2.0

the word forum should be avoided. Rather the name of the forum should be use. E.g. Www.example.com/General/news/6565-us-first-ebola-case/conversation-65

I don't think its too long. If other big forum has it what stopping fluxbb from same.

Maybe there can be options from the Installations  where any one can choose between seo url or not. is not this possible?

Last edited by joel (2014-10-02 18:33:53)


Warning! be informed and be forewarned. <p>
<?php
I'm not a native English Man. So my comments might contain some grammatical explosive (ELD), missapropreation of words (dinamyt), The use of wrong words (missiles), & mis spelling of words (war drones). Any of the occurrence can cause havoc. So be warned
?>

Offline

#14 2014-10-02 19:40:53

chris98
Member
From: England, United Kingdom
Registered: 2013-05-31
Posts: 906
Website

Re: Pretty URLs in v2.0

The word "forum" was only there because in the example I gave, that was the directory the forum sat in.

You could demonstrate it just as easy with: http://forum.example.com/topic/5678

Maybe there can be options from the Installations  where any one can choose between seo url or not. is not this possible?

That's similar to what I was talking about earlier.

Offline

Board footer

Powered by FluxBB 1.5.8