# Canonical Meta Data Does Not Change Correctly in Discourse App when not loaded by a webcrawler

**URL:** <https://meta.discourse.org/t/canonical-meta-data-does-not-change-correctly-in-discourse-app-when-not-loaded-by-a-webcrawler/159435>\
**Category:** Feature\
**Created:** [31 juli 2020 om 17:00 UTC](https://meta.discourse.org/t/canonical-meta-data-does-not-change-correctly-in-discourse-app-when-not-loaded-by-a-webcrawler/159435 "2020-07-31T17:00:39Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![neounix](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neounix/32/215617_2.png) [@neounix](https://meta.discourse.org/u/neounix)\
**Post date:** [31 juli 2020 om 18:02 UTC](https://meta.discourse.org/t/canonical-meta-data-does-not-change-correctly-in-discourse-app-when-not-loaded-by-a-webcrawler/159435/5 "2020-07-31T18:02:57Z")

</div>

> [@Falco](#):
>
> We serve a completely different document for crawlers

Thank you so much for letting me know.

Now, I realize that some earlier discussions about SPA, “infinite scroll” and other SEO related issues were completely wrong, since the SPA is not served to GoogleBot.

This changes my approach to some custom code I wrote recently; and now I know to check using the GoogleBot UA in the console.

Thanks so much for that, @Falco ! Much appreciated.

Question:

What is the best way to add a single custom javascript file to the HTML which is rendered to GoogleBot?

Is there a “standard way” to modify the HTML served to bots?

The reason I ask is that we have some custom code which was created in a plugin I wrote (meant for bots); but I checked using the GoogleBot UA in the console (thanks again for telling me that I need to do that), and none of that custom plugin code is consumed by GoogleBot.

 ![Screen Shot 2020-08-01 at 1.55.19 AM](https://global.discourse-cdn.com/meta/original/3X/2/c/2c3136d08564e308428e3a2b467322080008da2d.jpeg)

---

_[View the full topic](https://meta.discourse.org/t/canonical-meta-data-does-not-change-correctly-in-discourse-app-when-not-loaded-by-a-webcrawler/159435)._
