Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prerender.io's cached html header getting replaced by static header #208

Open
TianrenWang opened this issue Jul 20, 2021 · 0 comments
Open

Comments

@TianrenWang
Copy link

I have a Heroku app that I added a namecheap domain (https://www.platonic.chat/) to. I recently added SEO to the app using Prerender.io, so particular pages on the app have dynamic link preview. However, the namecheap domain does not display the desired dynamic link preview. I can see on my Prerender.io dashboard that it cached the pages correctly, but somehow the <meta> tags of the cached htmls got replaced by the <meta> tags of the static index.html when the cached htmls get fetched.

Another observation is that the Heroku domain that doesn't use namecheap (https://platonic-prod.herokuapp.com/) doesn’t have this problem. In the Heroku domain (https://platonic-prod.herokuapp.com/c/welcome-to-platonic), the desired title meta tag is:

<meta property=“og:title” content=“Welcome to Platonic”>
.
.
.

But in the namecheap domain (https://www.platonic.chat/c/welcome-to-platonic), the title meta tag is:

<meta property=“og:title” content=“Platonic”>
.
.
.

The body of the Prerender.io fetched html in both cases are the same, so it seems to me that something is replacing the header of cached html. The link preview gives the incorrect result when I use Facebook Debugger and metatags.io, but it gives the correct result when I use Googlebot through command line curl -A Googlebot https://www.example.com/ and displays properly on Discord. So why does adding a namecheap domain to a Heroku app modifies the cached html when it gets fetched?

I am using ExpressJS middleware for Prerender.io, caching Angular pages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant