Hyperlink Previews not working

I set up a new Rocketchat instance a few days ago. Everything is working as expected. Although, I have one strange issue. When I include a hyperlink in a discussion thread, I am not getting a graphical preview. It seems that by default system admin - message - embed link previews is ON. Is there another setting that I need? This is a brand new instance of RocketChat 3.18.1 running on Ubuntu Server 20.04LTS.

Hi there!

Make sure that the server that it is installed on can properly resolve DNS and connect to the internet.

I had this kind of issue once, and the dns was not working correctly, so the Rocket.Chat could not grab the link and create the preview properly.

If it’s not the DNS, it can also be some firewall dropping your connection.

I don’t think that it is dns, because I can click the hyperlinks in the messages and they immediately resolve correctly. Also, I can get to the RocketChat server both locally and from the public internet.

What is in your “admin – message – disable embed for users” field? That field was blank after I did the install. Should it be set to a particular value to not disable embed?

I have read in some places that in order to view inline images that I might need an update to NginX configuration. I run my RocketChat behind NginX Proxy Manager to handle reverse proxy lookup to my NAT. I have 37 other containers that are running the same way with no special settings. RocketChat works perfectly except for the inline image display for hyperlinks.


You should check the server DNS configs. When you post a link, the one that get the link to create the preview is the server it self, not the client.

Even if the server can be reached from the Internet, it may not be able to reach the internet properly.

That’s just a maybe… if you could access the container console/shell, and do a nslookup, we could eliminate this.

I am not sure about this nginx update. Can you post here the link where you got that?


I have and hardcoded as nameservers in /etc/resolv.conf. No difference. I am thinking that this is some NginX issue.

Did you check this doc about how to configure nginx properly?

When you post a hyperlink, what actually happens? Can you see something unusual at logs?

One thing that might affect this is the ROOT_URL config, but usually is for uploads, and as you stated that uploads are working fine, might now be the case.

So, here’s something really interesting. When I do an upload, the graphic appears inline correctly. When I have posted a hyperlink, I simply just type it in. For example, my Discourse server at https://discussion.scottibyte.com. If I post that on my RocketChat server, I don’t get any embedded inline graphic. If I post it on another Rocketchat server that a friend has, it works perfectly. My RocketChat server is at https://chat.scottibyte.com/. Interesting fact is that EVERYTHING else appears to be functioning perfectly by displaying an inline preview. In any event, I can click the link in the post and it goes there just fine.

Assuming that this is the actual domain, I was not able to access it from here :frowning:

no pinging too. Something is probably off with your deploy.

That’s unusual. Others can access it. Perhaps you are being filtered by my Geolocation filtering. Which country are you in?

I am based off Brazil.

Ok. Somehow my Geoblock had Brazil listed. You should be able to reach https://chat.scottibyte.com/. I am beginning to think that my issue has something to do with hairpinning. The reason is that I have found that embedded links to sites outside my network have thumbnails. Embedded links to sites inside my network are listed only as hypertext, but do not not include the inline preview. The hypertext links are clickable and work fine, but the previews just aren’t showing. If I had a link that resolves outside my network, the preview does show.

Well noted.

That’s probably the situation here.

So sites within your network will not be able to “resolv to itself”.

I have had this kind of problem myself and took a while to understand why it was happening.

Uploads should work fine, as you, as a client, will be able to render the remote URL. Probably would not work if you use the same gateway as your sever.