# Setting canonical URL when posting/cross-posting

**URL:** https://meta.discourse.org/t/setting-canonical-url-when-posting-cross-posting/239275
**Category:** Support
**Created:** [September 17, 2022, 1:49pm UTC](https://meta.discourse.org/t/setting-canonical-url-when-posting-cross-posting/239275 "2022-09-17T13:49:15Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![user12](https://avatars.discourse-cdn.com/v4/letter/u/e0b2c6/32.png) [@user12](https://meta.discourse.org/u/user12)
#### Post date: [September 17, 2022, 1:49pm UTC](https://meta.discourse.org/t/setting-canonical-url-when-posting-cross-posting/239275/1 "2022-09-17T13:49:16Z")

</div>

I have a personal blog, which sometimes have articles that fits another public discourse forum in my language.

Is there a way to specify the canonical URL when posting to discourse?, to avoid showing duplicate content to search engines.  
It’s a static blog, so no plugin exists, and not all posts fit the topic of the discourse forum.

It would be great if there is a way to specify the Canonical URL when posting.  
I read its possible through the API, I can request an API key from the admins, but what’s the command that I should use to post my topic?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [September 17, 2022, 3:35pm UTC](https://meta.discourse.org/t/setting-canonical-url-when-posting-cross-posting/239275/2 "2022-09-17T15:35:18Z")

</div>

Have a look at [Embed Discourse comments on another website via Javascript](https://meta.discourse.org/t/embed-discourse-comments-on-another-website-via-javascript/31963). I think that will insert the post automatically on discourse and handle the canonical bit.

---

<div class="post-metadata">

### Author: ![user12](https://avatars.discourse-cdn.com/v4/letter/u/e0b2c6/32.png) [@user12](https://meta.discourse.org/u/user12)
#### Post date: [September 17, 2022, 3:49pm UTC](https://meta.discourse.org/t/setting-canonical-url-when-posting-cross-posting/239275/3 "2022-09-17T15:49:34Z")

</div>

But I don’t want to use Discourse comments on my website, I just want to cross post with canonical URL set to the origin.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [September 18, 2022, 6:10pm UTC](https://meta.discourse.org/t/setting-canonical-url-when-posting-cross-posting/239275/4 "2022-09-18T18:10:23Z")

</div>

That’s my best idea. You might let it embed the comments and then hide them with CSS. That’s the only way that I can think of.( Though you might see what happens if you paste the blog url into the title?)

---

<div class="post-metadata">

### Author: ![user12](https://avatars.discourse-cdn.com/v4/letter/u/e0b2c6/32.png) [@user12](https://meta.discourse.org/u/user12)
#### Post date: [October 24, 2022, 8:14pm UTC](https://meta.discourse.org/t/setting-canonical-url-when-posting-cross-posting/239275/5 "2022-10-24T20:14:05Z")

</div>

> [@pfaffman](#):
>
> Though you might see what happens if you paste the blog url into the title

Nothing happens, its just normal title text
