Add meta tags, og tags etc to allow embedding discourse articles in other sites (e.g. via embedly)

(Eran Medan) #1

Trying to put discourse in places that use embedly / google feed API doesn’t work well

e.g. try,, and put any discourse link there, not working well

it needs some open graph tags (title, description) or at least put something in the meta tags

e.g. this is what it has now

<meta content="" name="description">


Some kind of marker for 'completed feature' posts
(Jeff Atwood) #2

This should work now, we properly Open Graph ourselves! Give it a shot and see.

(Dave Jensen) #3

Where do I fill in the details for the meta tags. The root page of my forum is still blank for meta description. Not having something here is really bad for SEO just look at what the homepage result looks like for Meta:

If you saw that in search results, would you click it? (Well, maybe if you already knew what it was but you get the point, right?)

(Jeff Atwood) #4

Really bad for SEO? What search terms did you use to produce that? Do other users, use those search terms?

(Dave Jensen) #5

Maybe not really bad but certainly not good. The discussion for this is about defaults not specific search terms. When you have something more specific, yes, Google will decide what to show but there are many, many cases where the default text (as determined by the meta description) will be displayed.

The reason it is important is actually not searchability, it is clickability. As much as a website operator can control it, they should strive to make their links and link descriptions clickable in search results. Here is some info: Meta Description | Moz

Look, I hate the SEO game, I really do, I fought with it at Spoke for years … it makes me upset. But we have to play by the rules and one of the first rules is decent meta descriptions, good titles, and h1 tags.

I’m not sure what would be good for meta description for all of the pages in a Discourse forum but I’d like to customize at least the index page, and maybe the categories page.

Update: looking at that link I sent in a little more detail, I can be okay to have no meta-description for long tail. However, the home/front page is generally not considered long-tail. Every other post/topic in the forum would be.

(Dave Jensen) #6

I have an example that more precisely addresses your questions:

Incognito window, search “axis and allies forums” a term that people use.

You get


My site is the second one but IMO the first one is a little more “clickable” of a result.

To break this into a separate, related, question, do you know how to specific to crawlers the information about the number of posts, last post, etc.? That’s really good stuff for SEO clickability too. I noticed that what Google has for my forum is widely inaccurate.

(Jeff Atwood) #7

Google may “sometimes” use meta tags for descriptions:

For example, we do sometimes use the “description” meta tag as the text for our search results snippets, as this screenshot shows:

Operative word being sometimes. So putting the meta tags in does not guarantee the result you want. Just so we’re clear about that.

I’m also very, very skeptical that real users type in “axis and allies forum” with any regularity into a search engine. They may type search terms that result on a hit to a forum page, which is much more interesting, but “axis and allies forum”?

(Dave Jensen) #8

IMO, when it comes to SEO, you can’t always trust Google. At Spoke we frequently say a disconnected between what Google said and what was reality. The only thing you can trust is when they say, “we made a change and your site could get hurt as a result.”

All I really care about customizing are the home/front page and maybe the categories page. Those give you a hint of insight of what you’re about to see before you click. Seeing a bunch of menu names is just ugly. Maybe it’s aesthetic thing too.

As for the other pages, yeah, leave it blank. For long tail, e.g., forum topics/posts, the semoz link I sent indicated that no meta description was better than trying to guess the right thing.

(Dave Jensen) #9

3% of my clicks from Google Search Results where the query included “forum.” But yes, hitting a forum page is more interesting.

If somebody Googles “Driven Community” I want the search result to look professional and not a hot mess. I want it to look like other sites who’s names I Google and they look professional.

I’ll work on a pull request to implement this as an option which will be blank by default. Fair enough?

(Jeff Atwood) #10

Well, at least on the category pages we already have the definition topics which contain an easy excerpt for you to use as a <meta name="description"> – it’s the same one that appears when you mouse over a category name. That should be plenty accessible, and easy to do.

In fact @Neil can you just make that happen?

On the homepage, it will require someone to write a summary of what the forum is as an admin text field. That also would not be bad to have for the directory, but I hate nagging people to write that kind of stuff because most people are terrible at it.

(Dave Jensen) #11

I think having it in the admin section is fine. Maybe make it somewhat generic, “Describe your forum in one sentence.” A help icon could explain what is it used for.

(Jeff Atwood) #12

Ok this is live now for categories thanks to @Neil.

<meta content="Support on configuring, using, and installing Discourse. Not for software development related topics, but for admins and end users configuring and using Discourse." name="description">
<meta content="" name="author">

We’ll add an admin setting and nag for the top-level description as well, perhaps tomorrow.

(Neil Lalonde) #13

I added the site_description site setting. It will be used in the meta description tag on the Latest and Categories page.

(Jeff Atwood) #15
<meta content="Feedback forum for the next-generation open source Discourse forum software" name="description">
<meta content="" name="author">

Yep looks good! Let’s see how long it takes Google to pick this up, if it ever does…

(Jeff Atwood) #16

Looks like I owe @djensen47 an apology, Google picked the change up already:

I’m impressed, I did not think it would be so immediate. (Also works for category pages.)

(Safareli) #17

meta description is empty on individual topics and on categories too.
author is empty on every page.

<meta content="" name="description">
<meta content="" name="author">

can you add og:image meta data and put there apple-touch-icon?

(Neil Lalonde) #18

I fixed the description meta tag, but didn’t add the og:image. We don’t have any of the other og stuff (title, type, etc.). Can’t you use the existing apple-touch-icon?

(Safareli) #19

it will be great if you add something like this in head:

<meta property="og:image" content="/images/apple-touch-icon.png">

because it is useful when sharing on Facebook for example.
using apple-touch-icon for that because it will be easier then adding another field in DB.