Platform guides

Google indexing guide for Laravel

A PHP framework. SEO behaviour is entirely in your code; meta tags live in Blade templates and the sitemap comes from a package or a custom command.

Updated: 05.11.2026 · 2 min read · Türkçe

Contents
  1. Where are the settings?
  2. Settings that affect indexing
  3. Common indexing problems on Laravel
  4. Next steps

Where are the settings?

The Blade layout (head section), public/robots.txt, routes/web.php and the sitemap package configuration.

Settings that affect indexing

  • noindex and visibility: Check the robots meta tag in the layout and any middleware adding an X-Robots-Tag header. If noindex depends on the environment, make sure APP_ENV is production live.
  • robots.txt: Edit public/robots.txt; if it is missing the framework returns 404. The web server root must be the public folder.
  • canonical and duplicate URLs: Output a canonical in the layout with url()->current() and leave query parameters out. For pagination, each page should carry its own canonical.
  • redirects and 404: Define 301s with Route::permanentRedirect in routes/web.php. When an Eloquent model is not found call abort(404); do not return an empty page with 200.
  • sitemap: Generate the sitemap with a package such as spatie/laravel-sitemap or a custom Artisan command and refresh it with a scheduled task. Include only published, canonical URLs.
  • speed and crawling: Cache routes, config and views in production (artisan optimize), cut database queries with eager loading and use OPcache.

Common indexing problems on Laravel

Open the matching page for steps specific to each status:

Next steps

Before publishing, run through Google indexing checklist: 15 items before you publish, scan the address with the free Free indexability checker tool and add new pages to the sitemap: How to build a sitemap and submit it to Search Console. For many pages, Google index panel: send, track and resend from one screen makes bulk submission easier; indexing is never guaranteed.

Frequently asked questions

Why is my Laravel site not showing on Google?

Usually because of a noindex setting, a robots.txt block, a missing sitemap or weak content. Check the settings above and the matching status pages in order.

What is the sitemap address for Laravel?

Generate the sitemap with a package such as spatie/laravel-sitemap or a custom Artisan command and refresh it with a scheduled task. Include only published, canonical URLs.

Related pages