# Amazon link preview works here but not on my forum

**URL:** https://meta.discourse.org/t/amazon-link-preview-works-here-but-not-on-my-forum/187142
**Category:** Support
**Created:** [April 16, 2021, 8:51pm UTC](https://meta.discourse.org/t/amazon-link-preview-works-here-but-not-on-my-forum/187142 "2021-04-16T20:51:54Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![mstm](https://avatars.discourse-cdn.com/v4/letter/m/6de8d8/32.png) [@mstm](https://meta.discourse.org/u/mstm)
#### Post date: [April 16, 2021, 8:51pm UTC](https://meta.discourse.org/t/amazon-link-preview-works-here-but-not-on-my-forum/187142/1 "2021-04-16T20:51:54Z")

</div>

Hello everyone,  
I don’t understand why I don’t see the preview of the amazon links.  
Here it works perfectly but in my forum that I updated today ( [9581d71372](https://github.com/discourse/discourse/commits/9581d713724457f453061ca85fb0462fa09d1cdb)) it doesn’t.  
Can it be cloudflare’s fault?

---

<div class="post-metadata">

### Author: ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)
#### Post date: [April 16, 2021, 9:40pm UTC](https://meta.discourse.org/t/amazon-link-preview-works-here-but-not-on-my-forum/187142/2 "2021-04-16T21:40:40Z")

</div>

When you’re writing a post, do you see an error like this in the preview?

![Screen Shot 2021-04-16 at 5.37.20 PM](https://global.discourse-cdn.com/meta/original/3X/2/6/2690f9ea315e7ad7c6a4deb787ab770cbafddb56.png)

There are some Amazon issues we’ve been running into where previews (oneboxes) have been hitting what seems to be a rate limit… we’ve made improvements in the past couple of weeks to try to avoid this, but it’s not completely solved and we’re looking for better options.

---

<div class="post-metadata">

### Author: ![mstm](https://avatars.discourse-cdn.com/v4/letter/m/6de8d8/32.png) [@mstm](https://meta.discourse.org/u/mstm)
#### Post date: [April 17, 2021, 8:10am UTC](https://meta.discourse.org/t/amazon-link-preview-works-here-but-not-on-my-forum/187142/3 "2021-04-17T08:10:07Z")

</div>

Thanks for your help Kris.

> [@awesomerobot](#):
>
> When you’re writing a post, do you see an error like this in the preview?

No, only a white box with Amazon

 ![image](https://global.discourse-cdn.com/meta/original/3X/e/c/ecc3f7bce6375a6cd3ab48d44d88a93c67eef7a8.png)  
I also cleared the cloudflare cache.

PS. Here on meta works perfectly.

Sorry I forgot, this is the list of installed plugins.

 ![Amministrazione - In Rete](https://global.discourse-cdn.com/meta/original/3X/c/0/c0aa2c8dcf15a01c441f101d34b43362d327cd27.png)

---

<div class="post-metadata">

### Author: ![mstm](https://avatars.discourse-cdn.com/v4/letter/m/6de8d8/32.png) [@mstm](https://meta.discourse.org/u/mstm)
#### Post date: [April 22, 2021, 1:15pm UTC](https://meta.discourse.org/t/amazon-link-preview-works-here-but-not-on-my-forum/187142/6 "2021-04-22T13:15:30Z")

</div>

I also tried on others Discorse forums and the preview doesn’t work, it only works here on meta 😁

Nothing I give up … I have tried everything but I don’t understand what blocks the preview of the Amazon links.

OK I found other useful information, I am writing because it could be useful to someone…  
The problem is the same:

> [@Unable to onebox Amazon.co.uk (but amazon.com works)](https://meta.discourse.org/t/unable-to-onebox-amazon-co-uk-but-amazon-com-works/131728/10):
>
> Incidentally, the Robot Check message does not appear here on meta, just a blank onebox:

If I run `curl https://www.amazon.it/dp/B07YSF42TT -v -o deleteme` I get error 503 so I give up.

Do you know if there is another way to add an image and a short description?

---

<div class="post-metadata">

### Author: ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)
#### Post date: [April 22, 2021, 1:41pm UTC](https://meta.discourse.org/t/amazon-link-preview-works-here-but-not-on-my-forum/187142/7 "2021-04-22T13:41:40Z")

</div>

> [@mstm](#):
>
> No, only a white box with Amazon

We get the same thing on our Discourse (v2.7.0.beta7( [42f6c9b6b9](https://github.com/discourse/discourse/commits/42f6c9b6b9db81e2a6a9ca45e76f067980525f67) )) when trying to share Amazon links:

 ![image](https://global.discourse-cdn.com/meta/original/3X/0/c/0c7389ed0908fe7f46aa543187baa325a2da60dd.jpeg)

And in the composer view:

 ![image](https://global.discourse-cdn.com/meta/original/3X/c/a/cad8f71e7b4276219d089c54a5b639038aa33719.png)

I just put it down to never-ending Amazon issues.

---

<div class="post-metadata">

### Author: ![mstm](https://avatars.discourse-cdn.com/v4/letter/m/6de8d8/32.png) [@mstm](https://meta.discourse.org/u/mstm)
#### Post date: [April 22, 2021, 2:12pm UTC](https://meta.discourse.org/t/amazon-link-preview-works-here-but-not-on-my-forum/187142/8 "2021-04-22T14:12:38Z")

</div>

> [@Richie](#):
>
> I just put it down to never-ending Amazon issues.

Unfortunately no, I think your VPS is also blacklisted ☹

---

<div class="post-metadata">

### Author: ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)
#### Post date: [April 22, 2021, 2:49pm UTC](https://meta.discourse.org/t/amazon-link-preview-works-here-but-not-on-my-forum/187142/9 "2021-04-22T14:49:53Z")

</div>

Sorry, yes, that’s what I meant 🙂

---

<div class="post-metadata">

### Author: ![mstm](https://avatars.discourse-cdn.com/v4/letter/m/6de8d8/32.png) [@mstm](https://meta.discourse.org/u/mstm)
#### Post date: [April 22, 2021, 3:08pm UTC](https://meta.discourse.org/t/amazon-link-preview-works-here-but-not-on-my-forum/187142/10 "2021-04-22T15:08:18Z")

</div>

Using `curl -A "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0" https://www.amazon.it/dp/B07YSF42TT` works fine, but now… how to change onebox useragent?

---

<div class="post-metadata">

### Author: ![mstm](https://avatars.discourse-cdn.com/v4/letter/m/6de8d8/32.png) [@mstm](https://meta.discourse.org/u/mstm)
#### Post date: [April 22, 2021, 5:10pm UTC](https://meta.discourse.org/t/amazon-link-preview-works-here-but-not-on-my-forum/187142/11 "2021-04-22T17:10:20Z")

</div>

Also `curl https://www.amazon.it/dp/B07YSF42TT -v -o deleteme -H "User-Agent: Discourse Forum Onebox v2.7.0.beta7" ` works.

```
> GET /dp/B07YSF42TT HTTP/2
> Host: www.amazon.it
> accept: */*
> user-agent: Discourse Forum Onebox v2.7.0.beta7
>
{ [5 bytes data]
* Connection state changed (MAX_CONCURRENT_STREAMS == 128)!
} [5 bytes data]
< HTTP/2 200
< content-type: text/html
< content-length: 7132
< server: Server
< date: Fri, 23 Apr 2021 07:17:05 GMT
< x-amz-rid: ZF2YDC7CWESPKSJ09DD0
< vary: Content-Type,Accept-Encoding,X-Amzn-CDN-Cache,X-Amzn-AX-Treatment,User-Agent
< strict-transport-security: max-age=47474747; includeSubDomains; preload
< x-cache: Miss from cloudfront
< via: 1.1 be8ca88bcfbe9f1ac2e2b6bb9e74f1d6.cloudfront.net (CloudFront)
< x-amz-cf-pop: MXP64-C2
< x-amz-cf-id: DfPapjMoZ5xW3vRm5sEk9bzKKmnq5TCDvbEi6y7dg6DreupmoWH2Jg==
<
{ [7132 bytes data]
100 7132 100 7132 0 0 78373 0 --:--:-- --:--:-- --:--:-- 78373
* Connection #0 to host www.amazon.it left intact

```

I don’t understand where I’m wrong…

 ![Segnalibri](https://global.discourse-cdn.com/meta/original/3X/9/1/91841fccc577c51dc3c6be1dc4118cb065e63e4b.png)  
OK, it only works with [amazon.com](http://amazon.com)  
.es, fr, de, it and others don’t work, it’s definitely a bug!

> [@Unable to onebox Amazon.co.uk (but amazon.com works)](https://meta.discourse.org/t/unable-to-onebox-amazon-co-uk-but-amazon-com-works/131728):
>
> Hi everyone, Running Discourse v2.4.0.beta6+119 We are unable to onebox links to products on amazon.co.uk eg (this works here btw): [BG Electrical Double Switched Power Plug Wall Socket, Nexus Metal, Brushed Steel, Grey Inserts, 13A, NBS22G : Amazon.co.uk: Musical Instruments & DJ](https://www.amazon.co.uk/BG-Electrical-NBS22G-Brushed-Switched/dp/B004TRJYE8) We can onebox links on [amazon.com](http://amazon.com) (and other Amazon TLDs) with no issues. The browser console shows a 404 Not Found error: I tried [the vimeo IP blocklist test](https://meta.discourse.org/t/vimeo-embed-not-working-on-my-site-due-to-vimeo-server-ip-blacklisting/126479/19) in case Amazon have also blacklisted a bun…

![Cat GIF](https://global.discourse-cdn.com/meta/original/3X/7/6/763a820cdfdd8d5ee5bbb52f30b7654bf5961894.webp)

---

<div class="post-metadata">

### Author: ![mstm](https://avatars.discourse-cdn.com/v4/letter/m/6de8d8/32.png) [@mstm](https://meta.discourse.org/u/mstm)
#### Post date: [June 6, 2021, 3:35pm UTC](https://meta.discourse.org/t/amazon-link-preview-works-here-but-not-on-my-forum/187142/13 "2021-06-06T15:35:19Z")

</div>

Hi all, I have updated to version [9ebc9541b9](https://github.com/discourse/discourse/commits/9ebc9541b9ddf09747a84ea496c3bb1f9ac55c66) and now the preview works on all amazon sites!

Thanks 😊

---

<div class="post-metadata">

### Author: ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)
#### Post date: [June 6, 2021, 6:29pm UTC](https://meta.discourse.org/t/amazon-link-preview-works-here-but-not-on-my-forum/187142/14 "2021-06-06T18:29:57Z")

</div>

Agreed!

This was the magic sauce that fixed it for us too:

[https://github.com/discourse/discourse/pull/13173](https://github.com/discourse/discourse/pull/13173)

Thanks @jbrw 🙇🏻‍♂️

---

<div class="post-metadata">

### Author: ![mstm](https://avatars.discourse-cdn.com/v4/letter/m/6de8d8/32.png) [@mstm](https://meta.discourse.org/u/mstm)
#### Post date: [June 7, 2021, 9:27am UTC](https://meta.discourse.org/t/amazon-link-preview-works-here-but-not-on-my-forum/187142/15 "2021-06-07T09:27:53Z")

</div>

I recommend a `posts:rebake` to generate the preview even the old messages.

```plaintext
./launcher enter app
rake posts:rebake

```

---

<div class="post-metadata">

### Author: ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)
#### Post date: [June 14, 2021, 11:18am UTC](https://meta.discourse.org/t/amazon-link-preview-works-here-but-not-on-my-forum/187142/16 "2021-06-14T11:18:47Z")

</div>

I would _not_ recommend a rebake at all.

Amazon very will likely block your server IP address for hammering on their door.

We’ve been here, multiple times, with Amazon, YouTube and Instagram 😕
