SEO问题:主题的slug名称在标题更改时不应更改

Another issue I detected today. This one is a particularly bad practice with regards to SEO and social media.

The slug name of a topic changes once the title changes.

That’s a big SEO no, no.

Imagine, you have a topic that has gained a lot of backlinks or is going viral on social media.

Now a TL3 user finds a typo in the title and changes the title.

The slug changes too and therefore the canonical URL.

All backlinks will be lost, and the topic will immediately stop going viral, as the former URL is now 404.

Slug names should freeze once a topic has been posted.

Only admins/mods should have the possibility to change the topic slugs and a warning should be given. Means, when I change the title as an admin/mod, options should be provided: only change the title, or change title and slug.

Update: I just found out that Discourse automatically 301 instead of 404 on slug changes. This mitigates the problem to some extend. Still would opt for a frozen slug.

1 个赞

I think the old link still points towards the actual topic, no?

4 个赞

Yes, it 301 redirects, but again I would opt for frozen slugs. Google “may” be fine with it. But if a TL3 user goes on a frenzy… I don’t know. I as an operator of the website would not like it.

For most social media sites, URL changes will mean you lose your engagement metrics for that URL, 301 don’t help here, more complicated approaches are needed in this case:

https://developers.facebook.com/docs/sharing/webmasters/getting-started/versioned-link/

1 个赞

It does, it redirects.

2 个赞

This isn’t an SEO no-no. You’re presenting an incredibly contrived set of circumstances. If you’re worried that TL3 users will do this, make TL3 unobtainable on your particular instance.

This also isn’t a bug, the redirect and slug updates aren’t a fluke, it was engineered to behave this way.

A bug report means something is broken, preventing normal/typical use of Discourse.

Which clearly isn’t true for the above.

5 个赞

我同意有一个允许我们(作为管理员)创建固定 slug 的设置的价值。

@Stephen 的解决方案是禁用某些用户更新其标题的功能。但我认为让用户改进他们的标题是个好主意。

即使作为管理员,我也经常重新组织信息和重命名内容,所以我不认为“不重命名标题”是个好解决方案。


其他想法

作为管理员,能够为帖子确定一个 slug 将是不可思议的。这样,即使主题的标题发生变化,slug 也能保持简短和简单。

这当然是对当前 301 重定向的补充,因为在试验之后,我意识到只要保留 URL 末尾的 /[#number] 即可正常工作。


我支持 @Terrapop 的请求,我认为这是一个很好的选项,可以提供给管理员并避免长期问题。

谢谢!

2 个赞

将我的评论定性为解决方案是不公平的——正如编辑中的回复所回应的那样,这并不是真正的问题。重定向使得对 slug 的更改变得毫无意义。

冻结 slug 假设原始标题和 URL 中可读的部分在某种程度上优于重命名后的版本。如果真是这样,为什么还要让用户重命名主题呢?这就是我的论点。

假设主题重命名 是有益的,为什么不希望可读的 URL 获得相同的增强呢?

2 个赞

在很多方面,重命名主题和更改 URL 并不是一个大问题,因为它可以正确重定向。主题路由基于主题 ID,所以即使您输入 https://meta.discourse.org/t/donk/162580,您仍然会转到该主题。该主题 ID 不会因网站上的任何用户交互而改变。

如果 URL 出现 404 错误,那 SEO 和社交媒体确实会成为一个问题,但它不会——它会重定向,Google 会正确更新 URL。

我们建议所有社区经理更新标题,以准确反映讨论的内容。这对于 SEO(排名最大的因素是搜索意图与页面内容匹配)以及社区内部的发现/参与都有好处。

有关我们如何看待 SEO 的更多信息:

1 个赞

因为如今 URL 不常显示了?而且因为 Discourse 根本不使用漂亮的 URL(不像 WordPress 那样可以做到)?

人类可读 URL 曾经是某种 SEO 炒作,当然它有助于用户理解可以期待什么,但如今大多数平台都在使用与 Onebox 类似的方法。URL 对用户来说不再重要了。

1 个赞

重命名标题如何自动重定向?这是一个必须手动配置的设置吗?目前重命名帖子似乎会破坏链接。

我无法在最新的测试通过中重现此问题。请逐步描述重现此问题的方法。

3 个赞

我已经进行了一系列测试,现在似乎可以按预期工作了,也许当时只是我这边出了错,或者我删除了帖子末尾的一系列数字。

主题标题更改的存储是否有数量限制,或者任何主题更改都会被重定向?

没有存储,甚至没有创建重定向。当 URL 包含话题 ID 时,话题的名称会被完全忽略,因此重命名是免费的。

例如,这里的话题是
https://meta.discourse.org/t/seo-issue-slug-names-for-topics-should-never-change-on-title-changes/162580
但如果我将 URL 更改为
https://meta.discourse.org/t/i-like-pineaple-pizza/162580
它仍然可以正常工作。

3 个赞

啊,我现在明白了,非常感谢 @Falco 的澄清 :raised_hands:

3 个赞