SEO·AEO·GEO

SEO by platform · Updated

Laravel SEO: metadata, sitemaps and rendering

Laravel apps that render Blade views on the server are crawlable by default; SEO is a matter of outputting the right tags in your layouts. If the front end is Vue or React through Inertia, enable Inertia's server-side rendering so crawlers get HTML.

Aalhad, Founder, SEO·AEO·GEO

Founder, SEO·AEO·GEO

Builds SEO·AEO·GEO and writes the crawler, schema, and citation research published here.

How Laravel serves pages to crawlers

Blade templates are rendered on the server, so the HTML includes your content. An Inertia or API-driven single-page front end renders in the browser unless you turn on server-side rendering.

Metadata in your layout

{{-- resources/views/layouts/app.blade.php --}}
<title>{{ $title ?? config('app.name') }}</title>
<meta name="description" content="{{ $description ?? '' }}">
<link rel="canonical" href="{{ $canonical ?? url()->current() }}">

Pass the title, description and canonical from each controller or view. Strip query strings from canonicals unless they change the content.

Checklist

  • Generate an XML sitemap, with a package such as spatie/laravel-sitemap or a route that outputs one, and list it in robots.txt.
  • Use named routes with readable slugs, such as /blog/{post:slug}.
  • Use abort(404) or route model binding so missing records return a real 404.
  • Return 301 redirects for changed URLs.
  • For Inertia apps, enable SSR so pages render to HTML on the server.
  • Cache rendered views and use a CDN for assets to keep responses fast.
  • Output JSON-LD from Blade for the page type.
  • Check robots.txt allows the AI search crawlers you want: OAI-SearchBot (ChatGPT search), Claude-SearchBot, PerplexityBot. See the AI crawler list and the robots.txt generator.
  • Check your host's or CDN's bot protection doesn't block them even when robots.txt allows them.
  • Make sure the main text is in the HTML the server sends. AI crawlers don't run JavaScript.
  • Avoid nosnippet and tiny max-snippet values on pages you want quoted; they also keep pages out of Google's AI Overviews.

Check it on your own site

What the free audit tests for this

  • Raw HTML visibility
  • Title tag
  • Canonical
  • sitemap.xml
  • Soft 404

One URL, about 20 seconds, no login. You get the result of every check and the exact fix for the top three issues.

Audit your website free

FAQ

Is Laravel good for SEO?+

Yes. Blade renders HTML on the server, and you have full control of URLs, status codes, metadata and sitemaps.

Do I need SSR with Inertia?+

If the pages need to rank or be cited, yes. Without it, the content is built in the browser.

Sources

  1. Blade Templates — Laravel Docs
  2. Server-side rendering (SSR) — Inertia.js
  3. Understand JavaScript SEO basics — Google Search Central