Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel Prerender

Laravel Prerender Laravel Package

codebar-ag/laravel-prerender

Laravel Prerender adds middleware that detects search engine and social crawlers and serves them prerendered HTML, helping JavaScript-heavy SPAs and dynamic pages get indexed. Configurable crawler rules, excluded paths, and Prerender.io integration make SEO setup simple.

View on GitHub
Deep Wiki
Context7

Laravel middleware for prerendering javascript-rendered pages onthe fly for SEO with prerender.io.

Frequently asked questions about Laravel Prerender
What does codebar-ag/laravel-prerender do for Laravel SEO?
It adds HTTP middleware that detects search engine and social crawlers by User-Agent and proxies matching requests to a prerender backend, returning rendered HTML. It is aimed at JavaScript-heavy Laravel SPAs or dynamic pages that need crawler-visible content for SEO. It is not needed if your Laravel app already server-renders content or uses static generation.
How do I install and register Laravel Prerender middleware?
Install with composer require codebar-ag/laravel-prerender, publish the config, and register the middleware on the web group or a route-specific group. Then set the prerender service URL and token and exclude paths such as /api, admin, and authenticated areas. Plan for a short staging pilot rather than a large migration.
How do I configure crawler user agents and excluded paths?
The package provides configurable crawler rules and excluded paths, so you can match search engine and social bot User-Agents and skip routes that should not be prerendered. Exclude API, admin, and authenticated paths to avoid rendering non-public or expensive pages. Keep the route set stable and review it as marketing or catalogue pages change.
Which Laravel and PHP versions does laravel-prerender support?
The package fits Laravel 8-11-era applications, but the upstream repository is archived and does not track Laravel 12 or PHP 8.4 middleware and config-publishing changes. Pin the version and validate it against your target Laravel and PHP matrix before planning. Do not assume compatibility just because Composer resolves it.
How do I connect it to Prerender.io with a token and service URL?
Set the Prerender.io service URL and token in the published configuration, then register the middleware so matching crawler requests are proxied to that backend. The package is routing glue; the actual render backend is the dependency that determines cost and reliability. Confirm your token and plan limits before sending production crawler traffic.
Can I use a self-hosted prerender backend instead of Prerender.io?
Yes, the middleware can proxy to a self-hosted Prerender or headless-Chrome container instead of the Prerender.io SaaS. That shifts the real dependency to your Chrome pool and its operational TCO, including timeouts, caching, and capacity. Compare SaaS pricing at your bot-traffic volume against self-hosted maintenance before choosing.
Is laravel-prerender safe for production given bot spoofing and rate limits?
Treat it as risky by default: User-Agent detection is spoofable, so any client can claim to be Googlebot and trigger an expensive render. The package does not provide reverse-DNS or IP verification, rate limiting, or timeouts, so add those controls yourself. Also monitor Search Console because SEO-critical failures may not show up as application 5xx errors.
Does it work with config:cache and route:cache in Laravel?
Because middleware registration can depend on runtime config, validate the setup with php artisan config:cache and route:cache enabled. Cached-config deployments can break if the middleware expects uncached configuration or dynamic route registration. Test the cached deployment path in staging before relying on it for crawlers.
How should I test prerendering for Googlebot in a Laravel app?
Use curl with Googlebot and a normal browser User-Agent against representative routes, then compare the HTML returned to what users see. Check that canonical URLs, robots directives, status codes, and content parity are correct, and watch Search Console for indexation changes. Also test excluded paths to confirm they are not proxied.
What alternatives or maintenance concerns exist for laravel-prerender?
Alternatives include server-side rendering, static generation, or a maintained prerender middleware or custom middleware around your render backend. The main concern with this package is that it is archived with no maintainer, security response, or compatibility patches. Fork it internally with pinned versions, UA verification, timeouts, rate limiting, and caching, or reimplement the small middleware if that is cheaper.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo
bernskioldmedia/laravel-harvest
bernskiold/laravel-data-scrubber
bernskiold/laravel-currency-converter
bernskiold/laravel-campaign-monitor
bernskioldmedia/laravel-autotranslate
siberfx/telegram-bot
roy-sandip/laravel-view-extended
gregsphotography/site-builder-core
roy-sandip/laravel-view
anodyne/blade-fluentui-icons
webx-ui/module-catalog-collections