SEO Problems with RSS duplicate content

For a topic created from an RSS feed, with embed set canonical url enabled, I’d expect curl -i to return the RSS item’s URL as the canonical URL. That works when I test it on my local site.

Assuming you have access to the Discourse Rails console, you can confirm what’s going on by finding the topic, then checking its topic_embed property. For example:

t = Topic.find 495
t.topic_embed

or just:

TopicEmbed.find_by(topic_id: 495)

A TopicEmbed should be returned. Its embed_url is what’s expected to be used by Discourse to set the topic’s canonical URL.

I’ve wondered about that myself. It would be more difficult than making changes to the RSS plugin, because embedding is part of the core Discourse code.