Add H1 titles for Discourse pages (SEO)

Hey there!
We’ve been working with the amazing support of the Discourse team on the migration of our two communities (TuDiabetes.org and EsTuDiabetes.org) from Ning to Discourse. [TuDiabetes.org][1] is already on Discourse, and we’re in the process of migrating EsTuDiabetes.

Since both communities are 8+ years old, we were fortunate to be able to get help on the SEO front from an SEO expert that has helped guide our steps to ensure that our previous SEO rankings are preserved as much as possible.

Currently there doesn’t seem to be any <H1> tags implemented on Discourse (at least not structurally). This is a missed opportunity, since this tag gets important weight by search engines. So he recommended the following:

Thoughts?
[1]: http://TuDiabetes.org

5 Likes

Hmm, I am seeing a H1 on the topic page:

Nothing on category pages, agree we should probably add it there.

1 Like

Sam,
Are you seeing the <h1> tag appear on THIS page?

When I search the source code, I cannot find it. I do see the <h2> tag assigned to the topic title:

<h2>
  <a href="/t/add-h1-titles-for-discourse-pages-seo/28106">Add H1 titles for Discourse pages (SEO)</a>
</h2>

It would be ideal to have <h1> be the one that has the title inside, since it's given more weight by search engines.

Ahh, I see this is only the case for js disabled / crawler.

Yes, there is a difference between view-source and inspect-element
I guess for SEO purposes (though IMHO a bit unnecessary) it should be in the no js mark-up

This is basically irrelevant, have the person who gave you this recommendation look at the page using the Google crawler user-agent, and they will understand why :wink:

2 Likes

Not really. They’re asking for a change to this line:

<!-- app/views/topics/show.html.erb -->

<h2>
  <%= render_topic_title(@topic_view.topic) %>
</h2>

Which is common in no-js and crawler view.

2 Likes

I am fine to change that to H1 it does not really matter that much.

2 Likes

Having this changed and also adding <H1> to the category name on category pages would have a sizable SEO impact, so YAY! :smile:

2 Likes

I just made this change.

Also related to TuDiabetes: the links that crawlers see were missing the subfolder (/forum), so I fixed those links.

7 Likes