Insight into setup:
Successfully implemented prerender (https://github.com/prerender/prerender) on my personal Ubuntu 16 server.
This is the content of my .htaccess file, which directs the url to prerender upon detection of a crawler. For instance: becomes
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteCond %{HTTP_USER_AGENT} baiduspider|facebookexternalhit|twitterbot|redditbot|slackbot|msnbot|googlebot|duckduckbot|bingbot|rogerbot|linkedinbot|embedly|flipboard|tumblr|bitlybot|SkypeUriPreview|nuzzel|Discordbot|quora\ link\ preview|showyoubot|outbrain|pinterest [NC,OR]
RewriteCond %{QUERY_STRING} ^_escaped_fragment_=$
RewriteRule ^(.*)$ http://example.nl:3000/http://www.example.nl/$1? [R=301,L]
#RewriteRule ^(.*)$ http://art.example.net/$1? [R=301,L]
RewriteRule ^(.*)/(.*)$ /#$1/$2 [NC,L]
The issue at hand:
Meta data fails to load on Skype, Reddit, and Twitter while using prerender. Redirecting the url back to the old PHP website: (currently commented out in the htaccess) does function properly. Since all meta tags are consistent across both the PHP and Angular sites, it is likely that prerenderer is causing this problem.
Error encountered on Twitter ( with url: ) while using Prerender:
ERROR: Failed to fetch page due to: HttpConnectionTimeout
WARN: this card is redirected to http://example.nl:3000/http://www.example.nl/63/Merry
Twitter successfully loads when redirecting to art.example.net (also utilizing the main URL: )
INFO: Page fetched successfully
INFO: 19 metatags were found
INFO: twitter:card = summary_large_image tag found
INFO: Card loaded successfully
WARN: this card is redirected to http://art.example.net/63/Merry
Utilizing the PHP version functions correctly and all meta data is retrieved.
In the future, I aim to completely phase out the PHP website, thus it's crucial for it to function seamlessly with Prerender. Prerender operates smoothly in Discord and Postman (with modified User Agent header). The reason behind its malfunction with certain other agents remains unclear to me.