prerender / prerender

Node server that uses Headless Chrome to render a javascript-rendered page as HTML. To be used in conjunction with prerender middleware.
MIT License
6.4k stars 924 forks source link

Crawling does not work properly when using own deployment of prerender #774

Open technicalbirdVayuz opened 7 months ago

technicalbirdVayuz commented 7 months ago

Hi,

We are using our own deployment of pre-render, i.e running prerender on port 4000, and updating the service URL as HTTP://website.com:4000/

if we request from the Google search console for a specific URL, logs also come but screenshot not come in the Google search console panel after the live test

Screenshot 2023-12-01 at 12 29 31 PM

Whereas if we are using a prerender service URL i.e HTTP://service.prerender.io/ as the service URL then it works fine, Please explain what could be the issue

technicalbirdVayuz commented 4 months ago

Any update on this?

turicas commented 4 months ago

Are you proxying bot requests for your prerender instances (as you would for the prerenderi.io service)? If no, please do so and test again. If yes, you must provide the logs and other details. Without it it's difficult to help.

technicalbirdVayuz commented 4 months ago

This is what I have done to setup

Doing the same with prerender.io as a service (with token) works

Screenshot 2024-02-28 at 1 12 07 PM Screenshot 2024-02-28 at 1 12 27 PM

Please help

turicas commented 4 months ago

Did you emailed any plugins? Which configuration (like env vars) you changed? I had to enable some plugins and test some different configurations to have it working properly for a website that takes a while to load. Check the plugins enabled by default in https://github.com/PythonicCafe/dokku-prerender (env.example file). Note that ENABLED_PLUGINS is an env var that my custom server.js uses, so you may enable them in another way (CACHE_* are also related to a custom plugin, prerender-plugin-fscache which is not included in the official prerender).

technicalbirdVayuz commented 4 months ago

These plugins are not available with this in this code: https://github.com/prerender/prerender, can you check once @turicas

turicas commented 4 months ago

These plugins are not available with this in this code: https://github.com/prerender/prerender, can you check once @turicas

Yes they are. https://github.com/prerender/prerender/tree/master/lib/plugins Please read the documentation and try enabling them.

technicalbirdVayuz commented 4 months ago

Following are the plugins that are enabled but still page does not rendered as expected

server.use(prerender.sendPrerenderHeader());
server.use(prerender.browserForceRestart()); 
server.use(prerender.addMetaTags());
server.use(prerender.removeScriptTags());
server.use(prerender.httpHeaders());
turicas commented 4 months ago

Sorry, without more information on the page being rendered I can't help you.