Easily serve prerendered content to search engines and social media bots in your Meteor.js app using the official Page Replica package. This improves SEO and sharing by ensuring bots see your site’s content, even if it’s JavaScript-heavy.
Add the Page Replica package to your Meteor project:
meteor add pagereplica:prerender
Check the Atmosphere package page for the latest version and options.
Add the following to your Meteor project’s settings.json file (replace values as needed):
{
"page_replica": {
"site_id": "YOUR_SITE_ID",
"domain": "yourdomain.com",
"bots": [
"google",
"bing",
"yahoo",
"baidu",
"yandex",
"duckduck",
"sogou",
"exabot",
"facebot",
"twitter",
"linkedin",
"pinterest",
"telegram",
"whatsapp",
"archive.org",
"ia_archiver",
"semrush",
"mj12bot",
"ahrefs",
"dotbot",
"rogerbot",
"linkdexbot",
"ltx71",
"uptimerobot",
"seznambot",
"qwant",
"screaming frog",
"uptime",
"semalt",
"barkrowler",
"sitebulb",
"zoominfobot",
"linkfluence",
"serpstatbot",
"netcraftsurvey",
"siteexplorer",
"trendictionbot",
"crawler",
"python-requests",
"curl",
"adsbot-google",
"mediapartners",
"propellerads",
"serpmetrics",
"buysellads",
"adsbot",
"duckduckbot",
"yisouspider",
"mail.ru",
"coccocbot",
"panscient",
"magpie-crawler",
"telegrambot",
"showyoubot",
"visionutils",
"applebot",
"zyborg",
"baiduspider",
"pinterest",
"httrack",
"wget"
]
}
}
Start your Meteor app with your settings file:
meteor --settings settings.json
To verify your setup, you can:
curl -A "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" https://yourdomain.com
You should see the prerendered HTML if everything is working.
Contributions are welcome! See the GitHub repository for details.