The title of the home page is now “: Latest topics”. Is it possible to only display the site name ?
At the end of the day, that issue is up to Google, rather than Discourse, I think.
<!DOCTYPE html> <html lang="en" class="desktop-view not-mobile-device "> <head> <meta charset="utf-8"> <title>Discourse Meta</title>
This is not solved, can we take a look to this problem?
In the translated versions is even worse… in Spanish “Latest Topics” translates as “Temas recientes” but google search title ends up with:
“Reciente temas - mydiscourseforum.com”
Also even this forum appears in google with title:
"Discourse Meta: Latest topics"
Other discourse forums show up in google with a title like:
"Latest topics - Yourfavoriteforum"
When the string appears before, it seems to be “autogenerated” by discourse, like if the forum logic thought that the home page is a category, so when other categories show up in google as
"Latest [category] topic - My forum title", in this case [category] is empty… that is what I think, but I don’t really know about it or how to find the real logic behind.
I only found 2 discourse forums, “Kohana Framework forums” and “Code for North Carolina forum”, that appear in google just with the title, without the “pre” or “post” string…
Curiosly, those forums use the version 1.0.0 of discourse, so the problem must have been created in more recent
I carefully reviewed the google guidelines about that and found no answers there.
The goal is to end up with the
<title> string as the only Google search result title… at least for the main forum section…
Sorry for rescuing that old theme, but I think this must be studied, or at least explained…
And my apologies for my bad english
<title> tag is not escaped here?
Hello, any news about this problem?
At least a clue about why and where is this happening?
We just pretend that only the forum title shows up in the google search results, without the “Latest Topics” string…
Example: look for “Heroku Forums” in google to see what we want…
Thanks in advance and sorry for the bumping !
You need a newer version of Discourse, the prefix for the default tab is removed in newer versions of Discourse. Update to latest.
You can see how it works here,for example.
Sorry @codinghorror, but it does not seem to work…
We are using the latest version.
This Meta forum still shows up in google like this (at least for me):
I am just trying to understand how does it work, but I feel still on an early stage of knowledge about SEO logic in discourse…
I found that if I explore my forum as Google, using the tool from:
then the HTTP response for the root site contains the wrong string in the title tag, while the live html navigating from my browser does not… so the bad string is in the html generated to serve google robots.
Also the complete set of search results is broken in the spanish translation, I mean, in english you say Recent Support Topics, but in spanish, that same word order: “Recientes Soporte Temas” has no sense… it must be “Temas Recientes [de] Soporte”
I am willing to collaborate with discourse to fix this thing, Spanish is probably one of the 3 most spoken languages in the world… just tell me where can I start looking, I have some programming notions, so I think I can help fixing that, just I don’t know where to start.
I think that is a cache result. Google didn’t refresh the result
I just generated it now using the tool, I appreciate your answer, though
Look at the date/time:
Khoa, could you test it for your site, or check another past indexing from the google tool?
Could be possible that somebody messed up that thing in our discourse installation? (I didn’t install it from beggining, so I am not sure if somebody changed that thing, but I don’t think so… they just followed the docker installation guide)
No. That’s not date/time Google index your site. You have to
Submit to index and wating for Google to index it (take days)
This is my 5 days old Discourse instances.
The site name is “Larask Discuss” and I have no ideas where was that Latest topics come from
P/s: acctually, Google did edit the title but for a good reason
When I fetch my site with Google tools, the title was
Latest topics - Larask Discuss
Oh aha I think you are right! We made this change to remove the extra text in the title tag from the default tab, but we did not implement this change in the webcrawler version of the page! @eviltrout can you fix this Monday?
@codinghorror Do you know why title was changed from
Latest topics - Site name when I fetched as Google to
Site name: Latest topics in the search result
Keep in mind that it’s very possible that Google is doing that transform because they think it’s better for their users, and you can’t really stop them from doing that.
But inconsistencies in the crawler view are very bad!
Thanks God you understood me at the end!! it seems that my english is so poor haha, sorry guys…
@thangngoc89: When you explore an address by using the “Explore as Google” tool, you see just the html that Google is receiving, in real time, by clicking in the “Path” or “Root” link generated for each obtained test. Then, the tool gives you the option to “Send to Index”, that is what I think you refer that probably may take some days to fully index.
Just click on the “/” link to see the real html that Google received, that is where the “bad” title string is. Just compare with you real source from your discourse site in your browser, and you will find the difference that I was trying to point.
Luckily for me, it seems that @codinghorror realized it, even with my terrible explanation !!
PS: @riking it happens before Google does any transform, I was talking about the plain html that Google receives from the discourse engine, as I said above, you can test it yourself with the Google tool. I was thinking as you at the beginning, but definitely is not the reason.
And just a last point about why the title shows as: “Page Title: Latest Topics” instead of “Latest Topics - Page Title”, well, you can find the same problem in this post: Google Groups
It seems that in both cases, Google knows that the “keyword” for the search is not “Latest Topics”, but “Page Title”, so now the Google Magic Dwarfs, change the order in the final result string, to put first the important word and then the “variable” or “dynamic” string… if you think about it, makes sense, even more by looking the example link above… where “buy vpn” is probably the string that the user is looking for.
Change line #5:
<title><%= content_for?(:title) ? yield(:title) + ' - ' + SiteSetting.title : SiteSetting.title %></title>
Or if that refers to any page in the site, then put a condition to simply do that for just the main page, but not for the other pages crawled. Sorry I am more c++ guy
This commit makes sure the default route doesn’t show the filter type: