Check 49.04 · User content and forums

Control the indexing of empty or thin threads

Decide which unanswered, thin, closed or duplicate threads stay indexed: a conditional noindex rule, merging, redirects and a sitemap that matches.

Priority
Important
Difficulty
Intermediate
Estimated time
1 to 2 days
Free, no account: your progress is saved in this browser.

Ask an AI to check this point on your site

Opens the assistant with a ready-made question: this check, its goal and your site URL.

For Gemini, Copilot or another assistant, copy the question. The link opens the chosen service directly: nothing goes through this site.

In short

A forum continuously produces pages that offer nothing to a visitor arriving from search: unanswered questions, one-line posts, duplicates, threads closed as off-topic. This check consists of setting a written rule, then applying it in the template: index, switch to noindex, merge or delete. Once it is done, only useful threads are indexable and listed in the sitemap, and a thread becomes indexable again as soon as it receives a real reply.

Why it matters

Google crawls threads one by one, then decides whether or not to index them. A page containing a ten-word question and no reply often ends up with the “Crawled – currently not indexed” status in the Page indexing report, or as a soft 404 if it looks empty. When these pages number in the thousands, they use up crawling, bloat the sitemap and muddy the reports: you can no longer tell a real problem from background noise.

Users lose out too. Arriving from Google on your own question, asked by someone else and left unanswered, is a dead end.

There are three mechanisms to know, all documented by Google:

  • noindex requires a crawl. Google must be able to read the page to see the rule. A URL blocked by robots.txt cannot be deindexed with noindex: it can remain in the results if links point to it.
  • The sitemap is a signal, not an order. It should list the URLs you want indexed, with an accurate lastmod. Google uses that date only if it proves reliable.
  • A merge translates into a 301 redirect, a deletion into a 404 or a 410.

For generative engines, nothing is documented about how empty threads are handled. A bot that reads an unanswered question simply has nothing to cite.

What it improves

  • Crawling Fewer requests spent on pages with no content; noticeable on forums with tens of thousands of threads.
  • Report readability The Page indexing report now flags only real anomalies.
  • Experience from search Fewer arrivals on dead ends.
  • Perceived quality of the site Google publishes no threshold or score on this; the effect on the rankings of other pages is an industry hypothesis, unproven.
  • Useful sitemap A reliable lastmod speeds up the pickup of new replies.

How to check

First measure the volume, in the database (adapt the table names):

SELECT
    COUNT(*) AS public_threads,
    SUM(replies_count = 0) AS unanswered,
    SUM(replies_count = 0 AND CHAR_LENGTH(body) < 300) AS unanswered_and_short,
    SUM(is_locked = 1 AND replies_count = 0) AS closed_unanswered
FROM threads
WHERE status = 'published';

Then check what a bot receives on an unanswered thread:

curl -s -D - https://example.com/forum/sujet-sans-reponse | grep -i -E "^x-robots-tag|<meta name=\"robots\""

Compliant result, if your rule excludes this thread: noindex in the header or in the tag, a 200 status code, and the URL absent from the sitemap.

curl -s https://example.com/sitemap-forum.xml | grep -c "sujet-sans-reponse"

In Search Console, open the Page indexing report and look at the reasons “Crawled – currently not indexed”, “Soft 404”, “Excluded by ‘noindex’ tag” and “Blocked by robots.txt”. Filter on the forum's sitemap: the share of URLs submitted but not indexed gives the measure of the problem. Detailed method in analyze pages crawled but not indexed (opens in a new tab).

How to implement

Step 1 — Write the rule

The thresholds below are editorial choices, to be adjusted to your community. Google publishes none.

Situation Suggested decision
Thread with at least one useful reply Index
Unanswered thread, detailed original post Index, or noindex during a grace period (30 days, for example)
Unanswered thread, post of fewer than 300 characters noindex, follow until the first reply
Thread whose only replies are “thanks”, “bump”, “same problem” Treat as an unanswered thread if you are able to detect them
Duplicate of an existing thread Merge, then 301 redirect to the thread you keep
Thread closed as off-topic, with no useful content noindex, or deletion with a 404 or 410
Thread closed but solved and complete Index: being closed is not a criterion
Spam Delete: see prevent user-generated spam (opens in a new tab)

Keep the rule simple: it must be computable from data already stored (number of replies, length, date, status), and translate identically into the robots tag and the sitemap.

Step 2 — Apply noindex without blocking crawling

  • Serve <meta name="robots" content="noindex, follow"> or the X-Robots-Tag: noindex header. See check meta robots and X-Robots-Tag (opens in a new tab).
  • Do not put these threads in robots.txt.
  • Keep a 200 status code and the content visible: the thread must remain usable by members.
  • The rule is recomputed on every request: the noindex disappears by itself with the first reply. Returning to the index requires a new crawl, hence the value of lastmod.

Warning: if pages are cached (page cache, CDN), purge the thread's page with every new reply. Otherwise the noindex keeps being served after the reply has arrived.

Step 3 — Merge, redirect, delete

For a duplicate, move the replies to the thread you keep, then 301 redirect the old URL. Do not use noindex to choose between duplicates: Google advises against it for canonicalization. See identify and consolidate duplicates (opens in a new tab). For a deleted thread with no equivalent, return a 404 or 410 (opens in a new tab).

Step 4 — Align the sitemap

The sitemap lists only indexable threads, first page only, with lastmod equal to the date of the last published reply (or of the last edit to the original post). See include only indexable canonical URLs (opens in a new tab) and provide a reliable lastmod (opens in a new tab). The pagination of long threads is dealt with separately: handle the pagination of long threads (opens in a new tab).

WordPress

Versions WordPress 6.5 to 7.1; bbPress 2.6.

In a small plugin, switch to noindex the bbPress topics with no replies and the single reply pages (each reply has its own URL, of no value for search):

<?php
add_filter('wp_robots', function (array $robots): array {
    if (! function_exists('bbp_is_single_topic')) {
        return $robots;
    }

    if (bbp_is_single_reply()) {
        return ['noindex' => true, 'follow' => true];
    }

    if (! bbp_is_single_topic()) {
        return $robots;
    }

    if (bbp_get_topic_reply_count(bbp_get_topic_id(), true) > 0) {
        return $robots;
    }

    return ['noindex' => true, 'follow' => true];
});

Align the native sitemap: no single replies, no topics without replies, and lastmod set to the last activity.

<?php
add_filter('wp_sitemaps_post_types', function (array $postTypes): array {
    unset($postTypes['reply']);

    return $postTypes;
});

add_filter('wp_sitemaps_posts_query_args', function (array $args, string $postType): array {
    if ($postType !== 'topic') {
        return $args;
    }

    $args['meta_query'][] = [
        'key' => '_bbp_reply_count',
        'value' => 0,
        'compare' => '>',
        'type' => 'NUMERIC',
    ];

    return $args;
}, 10, 2);

add_filter('wp_sitemaps_posts_entry', function (array $entry, WP_Post $post, string $postType): array {
    if ($postType !== 'topic') {
        return $entry;
    }

    $lastActive = get_post_meta($post->ID, '_bbp_last_active_time', true);

    if (! $lastActive) {
        return $entry;
    }

    $entry['lastmod'] = wp_date(DATE_W3C, strtotime(get_gmt_from_date($lastActive)));

    return $entry;
}, 10, 3);

If Yoast SEO or Rank Math manage the robots tag and the sitemap, apply the same rule with their own filters (wpseo_robots, rank_math/frontend/robots): refer to their documentation. To merge two topics, use bbPress's Merge link, then add the 301 redirect from the old URL.

Discourse

Verified on Discourse 2026.11 and against the code of the main branch.

  • What is built in: only unlisted topics (unlisted) receive X-Robots-Tag: noindex; they also drop out of the sitemap, which contains only the visible topics of public categories, dated by their last activity. Unlisting a topic (the topic's wrench menu) is therefore the manual tool for a thread of no value.
  • What does not exist: no setting switches unanswered topics or an entire category to noindex.
  • Upstream: the min first post length, min topic title length, title min entropy, body min entropy and allow duplicate topic titles settings limit the creation of topics that are too short or duplicated.
  • With a plugin: the Discourse code exposes a topic_noindex modifier. Check that it is present in your version before relying on it.
# plugins/noindex-thin-topics/plugin.rb
# name: noindex-thin-topics
# about: noindex on topics with no reply for more than 30 days
# version: 0.1

after_initialize do
  register_modifier(:topic_noindex) do |noindex, topic|
    noindex || (topic.posts_count <= 1 && topic.created_at < 30.days.ago)
  end
end

This modifier has no effect on the sitemap: the topics concerned remain listed there. For a duplicate, select the posts and move them to the existing topic.

Laravel

Versions Laravel 11 to 13.

Centralize the rule in the model, so that the page and the sitemap share it:

public function isIndexable(): bool
{
    if ($this->status !== ThreadStatus::Published) {
        return false;
    }

    if ($this->replies_count > 0) {
        return true;
    }

    return mb_strlen(strip_tags($this->body_html)) >= 300;
}

public function scopeIndexable(Builder $query): void
{
    $query
        ->where('status', ThreadStatus::Published)
        ->where(function (Builder $query) {
            $query
                ->where('replies_count', '>', 0)
                ->orWhereRaw('CHAR_LENGTH(body) >= 300');
        });
}

In the controller:

public function show(Thread $thread): Response|RedirectResponse
{
    if ($thread->merged_into_id) {
        return redirect()->route('threads.show', $thread->mergedInto, 301);
    }

    return response()
        ->view('threads.show', ['thread' => $thread])
        ->withHeaders($thread->isIndexable() ? [] : ['X-Robots-Tag' => 'noindex, follow']);
}

In the sitemap, iterate over Thread::indexable() and write $thread->last_reply_at ?? $thread->updated_at in lastmod.

Symfony

Versions Symfony 6.4, 7.4 and 8.x.

Same logic: an isIndexable() method on the Thread entity, used by the controller and by the command that generates the sitemap.

#[Route('/forum/{slug}', name: 'thread_show')]
public function show(Thread $thread): Response
{
    if ($thread->getMergedInto()) {
        return $this->redirectToRoute('thread_show', ['slug' => $thread->getMergedInto()->getSlug()], 301);
    }

    $response = $this->render('thread/show.html.twig', ['thread' => $thread]);

    if (! $thread->isIndexable()) {
        $response->headers->set('X-Robots-Tag', 'noindex, follow');
    }

    return $response;
}

Next.js

Versions Next.js 15 and 16 (App Router).

In app/forum/[slug]/page.tsx:

import type { Metadata } from 'next';

const isIndexable = (thread: Thread) => thread.replyCount > 0 || thread.text.length >= 300;

export async function generateMetadata({ params }: { params: Promise<{ slug: string }> }): Promise<Metadata> {
  const { slug } = await params;
  const thread = await getThread(slug);

  return {
    title: thread.title,
    robots: isIndexable(thread) ? undefined : { index: false, follow: true },
  };
}

And in app/sitemap.ts:

import type { MetadataRoute } from 'next';

export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
  const threads = await getIndexableThreads();

  return threads.map((thread) => ({
    url: `https://example.com/forum/${thread.slug}`,
    lastModified: thread.lastReplyAt ?? thread.updatedAt,
  }));
}

If the page is cached, invalidate it with every new reply (revalidatePath or revalidateTag), so that the robots tag keeps up.

Common mistakes

  • Blocking empty threads in robots.txt to deindex them: Google no longer sees the noindex, and the URLs remain known.
  • Frozen noindex: the decision is stored once, or cached, and the thread stays excluded after it has received replies.
  • Sitemap that lists every thread, including those in noindex, with a lastmod equal to the generation date.
  • Canonical from empty threads to the category or the home page: they are not duplicates, so the signal is wrong and ignored.
  • Bulk-deleting old threads without looking at their traffic: some short threads answer a specific search. Check the Performance report first.
  • Counting deleted replies or replies awaiting moderation toward the threshold.
  • Redirecting duplicates to the forum home page instead of the thread you kept.
  • Indexable single reply or single post pages (post permalinks), which duplicate the thread.

Frequently asked questions

Should unanswered forum threads be set to noindex?

It is an editorial choice, not a Google rule. A very short, unanswered question offers nothing to a visitor arriving from search: switching it to noindex until the first reply is common practice. A detailed question that describes a problem well can stay indexed: it sometimes attracts the person able to answer it. Set a threshold, then measure.

Why are my forum threads “Crawled – currently not indexed”?

This status in the Page indexing report means that Google has read the page and chosen not to index it for now. On a forum, it mostly affects threads that are unanswered, very short or close to other threads. It is not a technical error to fix URL by URL: improve or consolidate this content, and remove from the sitemap the threads you do not want indexed.

Can empty threads be blocked with robots.txt?

No, not to deindex them. The robots.txt file prevents crawling, not indexing: a blocked URL can remain in the results if links point to it, and Google can no longer read the noindex tag it contains. To take a thread out of the index, leave it crawlable and serve noindex in the meta robots tag or the X-Robots-Tag header.

What should I do with old unanswered threads?

Sort them using the data from the Performance report in Search Console. Those that still get clicks deserve a reply from a moderator or an expert, which makes them useful. Those with neither traffic nor content can be switched to noindex, or deleted with a 404 or 410 status code. Duplicates are merged into the most complete thread, with a 301 redirect.

Which lastmod should a discussion thread have in the sitemap?

Give the date of the thread's last significant change: in practice, that of the last published reply, or of the last edit to the original post if it is more recent. Google states that it uses lastmod only if it is verifiable and consistent. A date updated every time the sitemap is generated, or on every simple page view, discredits it.

Updated on

Topic checklist (PDF)

And now?

In the “User content and forums” topic

  1. Mark up discussions with DiscussionForumPosting
  2. Mark up question-and-answer pages with QAPage
  3. Prevent user-generated spam
  4. Control the indexing of empty or thin threads
  5. Control the indexing of member profiles
  6. Handle the pagination of long threads
  7. Make contributions readable without JavaScript or login