Site search

Search IndexLane

Type at least two characters to search.

    Technical note

    Technical SEO routing problems in Laravel and Next.js

    Check live responses, duplicate routes, rendering, and canonical URLs when a deployment changes how search engines reach your pages.

    By NikoPublished April 16, 2026Updated September 5, 2026Read 2 min

    If a page has the right title but still returns the wrong status, redirects unexpectedly, or exposes several competing URLs, start with routing. Editing the description will not correct the response the application sends.

    On Laravel, Next.js, and sites combining several systems, a deployment can change public URLs without an obvious visual change. Check the live page and its variants before tracing templates or components.

    Check what the public URL returns

    For an affected page, record:

    • The initial status and any redirects, through to the final URL.
    • The canonical URL in the response HTML.
    • Whether the main content and links are present before JavaScript runs.
    • Whether rendered content or metadata disagree with the initial response.
    • Which URL appears in internal links and the sitemap.

    Compare it with a working page from the same template. That helps distinguish a sitewide configuration problem from a route-specific error.

    Look for unintended URL variants

    Common places to check include:

    VariantPossible problem
    Locale or country pathsSeveral URLs expose the same page unintentionally
    Preview or staging URLsPrivate versions remain publicly crawlable
    Alternate hostsCanonicals are built from the wrong environment setting
    Parameters and aliasesInternal links promote a different URL from the sitemap
    Client-rendered pagesImportant content disappears when a request or script fails

    Alternate URLs can be legitimate. Confirm what each one is intended to serve before removing or redirecting it.

    Correct the inconsistent behaviour

    1. List the public variants for the affected page type.
    2. Agree the intended host, path, and canonical behaviour.
    3. Redirect genuinely replaced URLs to their relevant destination.
    4. Update internal links and sitemap entries to the intended final URLs.
    5. Check the content, status, and canonical again on production.

    Apply the correction where the behaviour is produced: routes, middleware, template code, or deployment configuration. Then test the same URL variants, including direct requests to deeper pages and malformed paths. A browser visit to the homepage will not exercise those cases.

    Related notes

    Technical SEO audit cost: what should you get for the price?

    What affects the cost of a technical SEO audit, what the report should contain, and how to agree which fixes and checks are included.

    Read article →

    Googlebot visited your page. That doesn’t mean it is indexed.

    Use server logs for crawl checks, URL Inspection for indexing, and performance reports for search traffic. Each answers a different question.

    Read article →