# Add H1 titles for Discourse pages (SEO)

**URL:** https://meta.discourse.org/t/add-h1-titles-for-discourse-pages-seo/28106
**Category:** Feature
**Created:** [Abril 29, 2015, 8:22pm UTC](https://meta.discourse.org/t/add-h1-titles-for-discourse-pages-seo/28106 "2015-04-29T20:22:32Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![askmanny](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/askmanny/32/36343_2.png) [@askmanny](https://meta.discourse.org/u/askmanny)
#### Post date: [Abril 29, 2015, 8:22pm UTC](https://meta.discourse.org/t/add-h1-titles-for-discourse-pages-seo/28106/1 "2015-04-29T20:22:32Z")

</div>

Hey there!  
We’ve been working with the amazing support of the Discourse team on the migration of our two communities ([TuDiabetes.org](http://TuDiabetes.org) and [EsTuDiabetes.org](http://EsTuDiabetes.org)) from Ning to Discourse. [[TuDiabetes.org](http://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:

- If the page is a Discussion Topic, make the `<H1>` tag correspond to the topic title. Example: for [http://www.tudiabetes.org/forum/t/taking-the-plunge-with-afrezza/23384](http://www.tudiabetes.org/forum/t/taking-the-plunge-with-afrezza/23384), H1 would become = “Taking the plunge with Afrezza”.
- If the page is a Discussion Category, make the `<H1>` correspond to the Category name. Example: for [http://www.tudiabetes.org/forum/c/treatment/insulin](http://www.tudiabetes.org/forum/c/treatment/insulin), H1 would become = “Insulin”.

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

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [Abril 29, 2015, 10:46pm UTC](https://meta.discourse.org/t/add-h1-titles-for-discourse-pages-seo/28106/2 "2015-04-29T22:46:28Z")

</div>

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

![](https://global.discourse-cdn.com/meta/original/3X/8/3/8306b5ea51cb583431091f29438962871daa720a.png)

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

---

<div class="post-metadata">

### Author: ![askmanny](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/askmanny/32/36343_2.png) [@askmanny](https://meta.discourse.org/u/askmanny)
#### Post date: [Abril 29, 2015, 10:55pm UTC](https://meta.discourse.org/t/add-h1-titles-for-discourse-pages-seo/28106/3 "2015-04-29T22:55:25Z")

</div>

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.`

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [Abril 29, 2015, 10:59pm UTC](https://meta.discourse.org/t/add-h1-titles-for-discourse-pages-seo/28106/4 "2015-04-29T22:59:34Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [Abril 29, 2015, 11:01pm UTC](https://meta.discourse.org/t/add-h1-titles-for-discourse-pages-seo/28106/5 "2015-04-29T23:01:35Z")

</div>

> [@sam](#):
>
> 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

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [Abril 30, 2015, 1:53am UTC](https://meta.discourse.org/t/add-h1-titles-for-discourse-pages-seo/28106/6 "2015-04-30T01:53:02Z")

</div>

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 😉

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [Abril 30, 2015, 2:25am UTC](https://meta.discourse.org/t/add-h1-titles-for-discourse-pages-seo/28106/7 "2015-04-30T02:25:38Z")

</div>

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

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

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

```

Which is common in no-js and crawler view.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [Abril 30, 2015, 2:26am UTC](https://meta.discourse.org/t/add-h1-titles-for-discourse-pages-seo/28106/8 "2015-04-30T02:26:53Z")

</div>

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

---

<div class="post-metadata">

### Author: ![askmanny](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/askmanny/32/36343_2.png) [@askmanny](https://meta.discourse.org/u/askmanny)
#### Post date: [Abril 30, 2015, 3:04am UTC](https://meta.discourse.org/t/add-h1-titles-for-discourse-pages-seo/28106/9 "2015-04-30T03:04:41Z")

</div>

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

---

<div class="post-metadata">

### Author: ![neil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neil/32/102150_2.png) [@neil](https://meta.discourse.org/u/neil)
#### Post date: [Abril 30, 2015, 4:52pm UTC](https://meta.discourse.org/t/add-h1-titles-for-discourse-pages-seo/28106/10 "2015-04-30T16:52:12Z")

</div>

I just made this change.

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

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [Abril 30, 2015, 11:22pm UTC](https://meta.discourse.org/t/add-h1-titles-for-discourse-pages-seo/28106/11 "2015-04-30T23:22:38Z")

</div>


