No content on homepage for Googlebot

Currently there doesn’t appear to be any content output in the #main-outlet element for Googlebot:

HTML for reference:

<!DOCTYPE html>
<html lang="en">
    <meta charset="utf-8">
    <title>Discourse Meta</title>
    <meta name="description" content="Discussion about the next-generation open source Discourse forum software">
    <meta name="author" content="">
<meta name="generator" content="Discourse 1.5.0.beta12 - version e84d5549efe6c24a6230cfbe2ce8c1b511ffc9d6">
<link rel="icon" type="image/png" href="">
<link rel="apple-touch-icon" type="image/png" href="">
<link rel="icon" sizes="144x144" href="">
<meta name="theme-color" content="#ffffff">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=yes">

        <link rel="alternate" type="application/rss+xml" title="Latest posts" href="" />
    <link rel="alternate" type="application/rss+xml" title="Latest topics" href="" />

        img { max-width: 100%; width: auto; height: auto; }
      <a href="/"><img src="" alt="Discourse Meta" id="site-logo" style="max-width: 400px;"></a>
    <div id="main-outlet" class="wrap">

    <footer class="container">
      <nav itemscope itemtype=''>
        <a href='/'>Home</a>
        <a href="/categories">Categories</a>
        <a href="/guidelines">FAQ/Guidelines</a>
        <a href="/tos">Terms of Service</a>
        <a href="/privacy">Privacy Policy</a>
      <p>Powered by <a href="">Discourse</a>, best viewed with JavaScript enabled</p>
    <script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-33736483-2']);

  _gaq.push(['_setCustomVar', 1, 'Anonymous', true, 2]);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);


 Discourse.ExternalNavItem = Discourse.NavItem.extend({
    href : function() {
      return this.get('href');

  I18n.translations[I18n.locale].js.filters.bugs = { title: "Bugs", help: "Open Bugs" };
  I18n.translations[I18n.locale].js.filters.features = { title: "Features", help: "Open Feature Requests" };
    buildList : function(category, args) {
      var list = this._super(category, args);
      if(!category) {
        list.push(Discourse.ExternalNavItem.create({href: '/category/bug?order=op_likes&status=open', name: 'bugs'}));
        list.push(Discourse.ExternalNavItem.create({href: '/category/feature?order=op_likes&status=open', name: 'features'}));
      return list;

I would expect the latest list of topics for meta.

1 Like

How did you set the user agent of Googlebot? My Chrome doesn’t have that choice and I wonder if it’s related.

Chrome Extenstion-

I am using this. Getting okay results as of now.

As per this post:

I added a “custom device” to Google Chrome dev tools using the newly proposed Googlebot smartphone user agent for mobile:

Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.96 Mobile Safari/537.36 (compatible; Googlebot/2.1; +

1 Like

Huh interesting, I can reproduce it while in incognito. Looking into it.

1 Like

I found this because I was running this new Mobile Friendly Google Tool against my Discourse instance:

I was expecting the output to be clunky - but expected topic results.

1 Like

Looks like it’s a combination of mobile + Googlebot. We had an optimization to never render the <noscript> content in mobile mode. I’ve changed it so that we only skip rendering that if we aren’t in our crawler layout. Seems to work!