Control of URL structure


(gahlord dewald) #1

This has been discussed previously here and here and I suspect this isn’t going to get re-opened. But I’d like to submit it for consideration perhaps in the future.

My concern is that neither /category/ nor /c/ have semantic meaning for normal humans. They could be done away with entirely and humans would have both a shorter URL as well as a URL that didn’t treat them to codely “wearing of underpants on the outside” as the URL is read.

Is there any reason to not simply have the URL be discoursesite.com/categoryname/topic-title/ ? This would keep all of the words in the URL relevant to what a user might find on the page when they get there. In the case of topics and categories crashing into one another a simple appending of -number to the end of the topic-title could resolve that.

In addition to resulting in a URL structure that was entirely semantic and related to the content one might expect to find on the page it would help with (here is where I dodge rotten vegetables) search engines. Inserting the /t/ and /c/ between the most semantically meaningful part of the URL and the beginning of the URL encourages to think the forum cares a great deal about “t” or “c” and that these are the two most important things for all of our discourse-enabled sites.

I realize that URL structure things are always a massive pain in the butt and that you have recently closed this topic and settled on the /t/ and /c/ approach. But I would ask gently that it be reconsidered for some time in the future.


(Michael Downey) #2

In the current design, if you move a topic from one category to a different one, the URL does not change. In the above description, one would either have to change the URL (and break links) or have an “outdated” URL if the category changed.


(gahlord dewald) #3

This is an interesting and valuable point.

Could this be solved with the software placing a 301 redirect on topics which are moved? That way any links formerly directed at the topic are then redirected to the new location?


(Tomo Vukasović) #4

Still you get problems if you move your forum from Discourse to another environment. Plus having that many redirects…not sure if that is good idea.


(gahlord dewald) #5

Fair enough. I can’t say that I’m especially concerned about moving from one forum software to another. Or that I would want Discourse to curtail progress for those ends.

In the event of a domain transfer or platform transfer there are a number of things which must be done regardless of software handling of URL structures. These include an audit of existing 301s, existing links to the site etc.

The final stage of doing this sort of thing responsibly is to craft a .htaccess that 301s all known old URLs to worthwhile new URLs. This work would be effected by eliminating the non-semantic /c/ and /t/.

I guess I don’t see it as a relevant issue.


(Dave McClure) #6

Is your primary concern the presence of t and c? or the absence of category-name?

If the latter, one approach that would better fit the current design would be to include the category name in the slug.

For instance, this link will correctly bring you to this topic:

And if the category name is changed, it will still bring you here:


(gahlord dewald) #7

It’s both really: that the category is not in a topic’s URL and also that “t” and “c” are given more prominence in the URL structure than the stuff that has meaning for humans (an by extension, search algorithms).


(Kane York) #8

Would you say that “r” is given more precedence than the “stuff that has meaning for humans” in 301 Moved Permanently ? How about in /r/SubredditsAsHashTags ?

I honestly don’t see the problem with support - Discourse Meta at all, especially in comparison to https://meta.discourse.org/category/support.


(gahlord dewald) #9

Yes I do, in the case of famous websites as well as not-famous websites.

We have a difference of opinion, regardless of appeal-to-authority.


(gahlord dewald) #10

I would like be clear also that it isn’t the word “category” I would like to see in the URL.

I would like to see the actual name of the category: support/topic-title meta/topic-title cars/my-awesome-hybrid-humvee birds/this-is-my-parrot etc.


#11

I would second the proposals by @gahlord

To me and I’m sure to thousand of others, the intuitive, obvious and most user friendly design is and should be:

site/cat-name/topic - a semantic, human readable address

Discourse by contrast uses:

site/t/topic - a non-semantic, machine readable address

I’ve read the discussions here and it seems @codinghorror has more or less acknowledged the ‘t’ and ‘c’ are workarounds, hence the topic is closed to further discussion. I can understand why (ie it’s a royal pain in the ass to implement semantic urls) but in my opinion this is a mistake. Here are my reasons:

Consider a semantic url design for a pet-related forum:

Ubisoft
Ubisoft

Now consider the Discourse implementation of the above urls:

Ubisoft
Ubisoft
Not only does this leave users guessing as to the content of the topic, it misses a big trick in terms of SEO. Semantic urls act as their own anchor text

Personally I don’t have a massive problem with the ‘t’ and ‘c’ ,but I think they would be unnecessary and irrelevant in a better designed url structure.

Some have used the example of ‘r’ in Reddit urls, but Reddit urls all contain semantic information for the user ie:

Don’t get me wrong I’m not trying to criticize. Frankly I’m in awe of the Discourse project. However it must be said that the url structure is at best a workaround, at worst, broken.


(Jeff Atwood) #12

Your proposal means re categorizing a topic would break old URLs. Also we know from Stack Overflow that having the category in the title tag, as we already do, confers the same benefits as having it in the URL but in a more flexible way.


(cpradio) #13

Would it? As it doesn’t when you alter a title? The category would purely be meta-data, not used for any sort of validation.

Granted, I see little to zero reason to have the category in the topic URL.


#14

Granted, I see little to zero reason to have the category in the topic URL.

Let’s say you were building a business, and wanted to build a support forum for your user community.

If you built Discourse categories for Product A, B C etc, you would ideally want these products reflected in the urls of the forum posts, not only for users, but to start building relevance and reputation in search engines in order to grow your business.

If Product A never shows up in a url, it’s a massive wasted opportunity for the business owner.

Sure, title tags are very important, but it’s long been proven that semantic urls plus good pages titles are not only best practise, but vital for good search results.


#15

having the category in the title tag, as we already do, confers the same benefits as having it in the URL but in a more flexible way.

Kind of… Google only shows the first 50-60 characters of the page title, so in a post like the example below, the category is never displayed in the search results. meaning there’s zero reference to the category, in terms of search (see screen shot)

This means you’re not building any relevance or authority for the term ‘ux’ in the case of these long strings.

By the way.

HAPPY NEW YEAR!!!


(Jeff Atwood) #16

The title is completely ignored, you can type anything in the title part of the URL. We expect the title to be fluid. It is more typical for title to get edited and revised than category.

Anyway, from a search perspective, we know that having the category in the title tag works very well. It doesn’t need to be in the URL. Just try searching for stuff on Stack Overflow, which uses the same URL scheme (title in URL, category in title tag) and is one of the 50 largest public websites in the world. It works!

So I understand from an aesthetic standpoint you might prefer the category in the URL, but from a practical standpoint of finding things via search, there is no difference.

(Remember too that everything in the URL pushes the title over out of view, too, so when one says “the category must be in the URL” one is also saying “I want to devalue the title of the topic” which is IMO a bad trade off, particularly since you get 90% of the practical benefit from the category being in the title tag. Most news sites and blogs simply use the title in the URL, maybe with month and year, never category.)


(Mittineague) #17

For longer Category names it could make spotting the tab of interest more difficult if not impossible.
What’s more important, being user friendly or reaching for perceived SEO benefit?


#18

Just try searching for stuff on Stack Overflow, which uses the same URL scheme (title in URL, category in title tag

Need some clarification on this.

At current it seems that Discourse puts the category at the end of the title tag, which is a massive bummer in terms of SEO (see my previous post).

As it looks like we’re beyond considering discussion about having the category in the url, how about considering moving the category to the beginning of the title tag (ie as in StackOverflow)

Without this, it puts Discourse forums at a big disadvantage for anyone who is concerned about having any competitive relevance and authority in search engines.

Many thanks,


(Michael Downey) #19

Please, please, please don’t do this. Useful (specific) titles in search results is far more valuable to our users. Having the same word repeated at the beginning of most results is a waste of valuable character space.


(Khoa Nguyen) #20

It seem like this is tons of work. Because URL structure was hardcoded (at least in Handlebar template)