# Strategies to resolve indexed URL conflicts in Discourse

**URL:** https://meta.discourse.org/t/strategies-to-resolve-indexed-url-conflicts-in-discourse/368880
**Category:** Support
**Created:** [June 4, 2025, 5:22pm UTC](https://meta.discourse.org/t/strategies-to-resolve-indexed-url-conflicts-in-discourse/368880 "2025-06-04T17:22:19Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![MihirR](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mihirr/32/475158_2.png) [@MihirR](https://meta.discourse.org/u/MihirR)
#### Post date: [June 4, 2025, 5:22pm UTC](https://meta.discourse.org/t/strategies-to-resolve-indexed-url-conflicts-in-discourse/368880/1 "2025-06-04T17:22:19Z")

</div>

Hi all,  
I’m running a Discourse forum and need help with a major SEO + indexing issue after a rebuild.

### What Happened:

- My original Discourse forum **crashed** , and I lost **around 10,000 topics**.

- I rebuilt the forum **from scratch** , keeping the **same domain** and **same Google Search Console (GSC)** property.

- Since Discourse uses **incremental topic IDs** , the newly created topics are now **reusing old topic IDs** (e.g., `/t/783`previously belonged to a deleted topic, and now it’s assigned to a new one).

### Current Problems:

1. GSC shows over **12,000 “Crawled - Not Indexed”** URLs.

2. Old topic URLs like `/t/old-topic-title/783` are still **indexed or being crawled**.

3. These URLs now point to **new content** (e.g., `/t/new-topic-title/783`), which causes **title mismatches** in search and possibly triggers **duplicate/thin content penalties**.

4. Some old topic URLs are **still being served (not 404 or 410)** and are merging with current topics that have the same ID.

5. The **sitemap includes reused IDs** , confusing crawlers further.

What should I do to solve it?

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [June 4, 2025, 6:33pm UTC](https://meta.discourse.org/t/strategies-to-resolve-indexed-url-conflicts-in-discourse/368880/2 "2025-06-04T18:33:23Z")

</div>

In postgres you could manually set the topic ID sequence to a high value, e.g. 20000, so that new topics start at that number:

```plaintext
SELECT setval('topics_id_seq', 20000, false);

```

> [@MihirR](#):
>
> My original Discourse forum **crashed**

You lost the server itself? 😢

---

<div class="post-metadata">

### Author: ![MihirR](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mihirr/32/475158_2.png) [@MihirR](https://meta.discourse.org/u/MihirR)
#### Post date: [June 4, 2025, 6:37pm UTC](https://meta.discourse.org/t/strategies-to-resolve-indexed-url-conflicts-in-discourse/368880/3 "2025-06-04T18:37:13Z")

</div>

Yup the whole db too.

So I did make a new one, so it already have around 6000 topics so should I from now onwards make it from 20k ?

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [June 4, 2025, 6:46pm UTC](https://meta.discourse.org/t/strategies-to-resolve-indexed-url-conflicts-in-discourse/368880/4 "2025-06-04T18:46:54Z")

</div>

Ideally you would have done that as soon as you created the new site, but it’s too late now.

Better late than never - if that sequence is currently at 6000 and you set it to 20000, the next new topic will have ID 20000 instead of 6000.

---

<div class="post-metadata">

### Author: ![MihirR](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mihirr/32/475158_2.png) [@MihirR](https://meta.discourse.org/u/MihirR)
#### Post date: [June 4, 2025, 6:49pm UTC](https://meta.discourse.org/t/strategies-to-resolve-indexed-url-conflicts-in-discourse/368880/5 "2025-06-04T18:49:08Z")

</div>

So it would be like 1-5999 and then 2000 and so on? Right? And hope this won’t cause any issue on further stages?

Or shall I just leave this and with time new topics would overwrite the old one?

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [June 4, 2025, 6:50pm UTC](https://meta.discourse.org/t/strategies-to-resolve-indexed-url-conflicts-in-discourse/368880/6 "2025-06-04T18:50:44Z")

</div>

The advice is addressing your complaint that old topic IDs are being “reused”. Bumping that sequence up to 20000 will prevent any topics between 6000 and 19999 from being created.

---

<div class="post-metadata">

### Author: ![MihirR](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mihirr/32/475158_2.png) [@MihirR](https://meta.discourse.org/u/MihirR)
#### Post date: [June 4, 2025, 6:52pm UTC](https://meta.discourse.org/t/strategies-to-resolve-indexed-url-conflicts-in-discourse/368880/7 "2025-06-04T18:52:54Z")

</div>

Yes, let’s say if it even overwrites with time like 6000 and so on with new topic urls this won’t cause any issue, or can it break something in future.
