Technical SEO in Laravel: schema, sitemaps and canonicals in code
The SEO basics a developer controls: one canonical per page, honest schema, a sitemap that updates, and redirects that do not chain.
Most technical SEO is not marketing; it is making sure each page declares what it is. In Laravel that means a single source of truth for titles and canonicals, structured data generated from real content, and a sitemap that reflects the database.
One title, one description, one canonical
Every page should set exactly one title, one meta description and one canonical URL. Generate them from the record — title plus site name, an excerpt trimmed to 155 characters, and the model's own URL. Duplicated canonicals across paginated pages are the most common mistake we find.
Structured data that matches the page
Article schema on posts, Organization on the homepage, BreadcrumbList wherever you show breadcrumbs, Product or WebApplication on product pages. Only mark up what is visible; mismatched markup is a manual-action risk. FAQ rich results are no longer a SERP feature, though the markup stays valid.
Sitemaps generated, not hand-written
Query published, indexable records and output them in a sitemap index. Include lastmod from updated_at so crawlers can prioritise. A hand-maintained sitemap is wrong within a month.
Redirects and status codes
Keep one redirect per old URL, never a chain, and return 301 for permanent moves. Delete content deliberately: a 410 is clearer than a 404 that lingers. Log 404s and fix the internal links that caused them.
Frequently asked questions
Should paginated pages be indexed?
Usually noindex, follow, with a self-referencing canonical on page one only. Infinite pagination with no canonical wastes crawl budget.
Does page speed affect rankings?
It is a factor through user experience rather than a large direct one. It matters most when it is bad enough to make people leave.
More on this topic: Performance & SEO articles.
Admin
Related articles
Internal linking: the cheapest SEO work you are not doing
Every important page should be linked from somewhere with descriptive anchor text. It costs nothing and it compounds.
Getting a new site indexed by Google: a checklist that works
Verify Search Console, submit a sitemap, make sure nothing is blocking crawl, and then be patient. Most indexing problems are self...
How to speed up a slow WordPress site without rebuilding it
Hosting, page cache, images and plugins — in that order. Most slow WordPress sites improve dramatically before any theme work.