The 500 error is only visible in the browser’s developer tools, and the page that the user sees on the frontend is normal
The error only seems to affect https://imagesplitter.tools/grid-image-splitter this particular URL
Other pages of the site don’t show a 500 error in Developer Tools
In the local development environment, this 500 error does not occur
I’m worried that this hidden 500 error could affect the SEO of the website because search engine crawlers might detect this error. I tried the following troubleshooting steps, but the problem persists:
The source code was checked and no obvious errors were found
Tested in a local environment with no 500 errors
Checked Cloudflare’s page rules and workers and found no misconfigurations
Cleared Cloudflare’s cache
What are the steps to reproduce the issue?
When I open the URL https://imagesplitter.tools/grid-image-splitter and check the developer console, I notice a 500 Internal Server Error. Although the page appears to load normally for users, this hidden error concerns me as it may potentially impact the website’s SEO, since search engine crawlers might detect this issue.
Accessing a single file separated from other ones may lead to errors. Depending of the complexity of your website that can eventually happen.
As I understand if the front end works fine and the users can access the site normally (that what maters). Then you could think on disable that file from be accessed from outside your hosting server.
In that way only the site application will access it and no crowlers / SEO or public access.
Also, when you are in development / local mode your browser have access to all local variables and configurations that the remote access doesn’t have.
What maters are the users have normal access to the site. That’s what crawlers should also access. Apart from that engines should not access to specific files, so block that file form remote access.
It is important to point out that on your screenshot the 500 Internal Server Error is returned by your localhost and not Cloudflare, as the remote server is set to 127.0.0.1:16005. It is possible that 500 is returned by your forward proxy that sits between your browser and Cloudflare — double check that first.
Thank you, Eduardo, for your reply. I understand where the problem lies; it’s because a component in my code needs server-side rendering. I can fix it by changing this component to ssr:true rendering.
Thank you, ncano, for your reply. I have fixed the 500 issue; changing one component in the code to server-side rendering with ssr:true is enough. The remote server is set to 127.0.0.1:16005 because my network uses a proxy, and the real IP is hidden.