If every page on a Next.js site outputs the homepage URL as its canonical, the site is telling Google that the homepage is its preferred representative—even for routes with different content. A canonical tag is a strong signal, not a command: Google can choose a different URL. Check the canonical in each route’s rendered HTML, correct any shared value that points to the homepage, and verify Google’s choice in Search Console.
What a homepage canonical tells Google
A rel="canonical" link identifies the URL a site prefers as the representative of duplicate or very similar pages. Google groups URLs based on their primary content and selects the version it considers the most complete and useful for search users; the tag does not, by itself, make unrelated pages duplicates. Google’s canonicalization guidance explains how that selection works.
As an Amazon Associate I earn from qualifying purchases.
If a shared layout outputs the homepage URL as canonical on every route, it communicates a site-wide preference for that homepage URL. That may be wrong for routes with their own distinct content. The tag does not guarantee that Google will follow the preference, so distinguish what your site declares from what Google actually selects.
Recommended Free Tools
How to check the canonical emitted by Next.js
In a Next.js App Router project, metadata can be defined in the root layout, nested layouts, and route pages. Review those definitions and then inspect the final HTML for several representative routes. The rendered <link rel="canonical"> is what matters; inspecting only a metadata object may not reveal the final value after metadata is combined.
#1 Best Overall
- Inspect the root layout. Check
app/layout.jsor its equivalent for a fixedalternates.canonicalvalue. If it names the homepage, determine whether that value is being reused on other routes. - Review route and nested-layout metadata. Look for route-specific canonical declarations and confirm how they combine with shared metadata.
- Check the rendered page. Open the HTML for the homepage and distinct routes, and confirm that each canonical points to the intended absolute URL.
- Verify the base URL. Next.js uses
metadataBaseto resolve URL-based metadata; it is typically set in the root layout. Confirm that it uses the production origin and that relative canonical paths resolve to the correct routes. See the Next.js metadataBase documentation.
Make the site’s canonical signals consistent
Once you know what the pages emit, compare their canonical targets with the site’s other signals. Google describes redirects and rel="canonical" annotations as strong signals, while sitemap inclusion is a weaker signal. Internal links should also point consistently to the URLs you want recognized as canonical. Google’s guidance on consolidating duplicate URLs describes these signal strengths.
- Use a canonical that reflects the intended representative for each page, rather than a fixed homepage URL on every route.
- Check that redirects lead to the intended canonical URL.
- Include the intended URLs in the sitemap, and ensure internal links support the same preference.
Check which URL Google selected
Use Google Search Console’s URL Inspection tool to inspect a specific route. Compare the user-declared canonical with the Google-selected canonical. If they differ, first confirm that the declared URL is correct and that redirects, sitemap entries, and internal links consistently support it. Then assess whether Google’s selected URL is a more useful representative for search users.
Rank #2
A mismatch is evidence that Google selected a different canonical; it is not, on its own, proof that a route has been removed from the index or that the site received a penalty. Google says duplicate content alone is generally not a policy violation, though duplicate URL variants can affect crawling and user experience. The result for any particular site depends on its actual output and Google’s assessment.
Free tools Windows power users keep installed
One-click scans. No signup required.
Quick Recap
Best Value
Rank #3
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

