SEO middleware that serves pre-rendered HTML to search engine bots while keeping zero performance impact on human visitors. Current stable version is 1.3.2, with regular updates. Key differentiators: seamless integration with Next.js (single-line setup), Netlify Edge Functions, and Express.js; automatically detects a wide range of bots (Google, Bing, Yandex, social media crawlers, AI bots like GPTBot and Claude); supports custom API URL, extra bots, and exclusion paths. Built by Rank Deploy, it offers a simple, efficient alternative to more complex prerendering solutions.
npm install rankdeploy-middlewareVerified import paths — ran on the pinned version, not inferred.
One-line integrations for Next.js, Netlify Edge Functions, and Express.js.
Ensure file is middleware.ts at root and export { middleware, config } from '@rankdeploy/middleware/next'.Name the file rankdeploy.ts and add [[edge_functions]] function = "rankdeploy" path = "/*" to netlify.toml.
Place app.use(rankdeploy()) as early as possible, before express.static and route handlers.
Consider using createMiddleware to specify a custom apiUrl or watch for changelog updates.
Ensure your tsconfig.json includes 'node_modules/@types' or install @types/node. Also verify the package is in dependencies (not devDependencies) if you need types in production.
Use export { middleware, config } from '@rankdeploy/middleware/next'. Do not use import or default export.Ensure the file exports default: export { default } from '@rankdeploy/middleware/netlify'. The file name must match the function name in netlify.toml.Use import { rankdeploy } from '@rankdeploy/middleware/express'. Then call rankdeploy() (note parentheses).No dependency data recorded yet.