One line of metadata hid 15 of our pages
A canonical tag in our root layout told Google that 15 pages were copies of the homepage. What happened, how we fixed it, and how to check your own Next.js site.
- Written by
MohammedCo-founder and CEO- From
Our own site- Topic
- Growth
- Published
- · 2 min read
The short version
- In Next.js, metadata in the root layout is inherited by every page.
- A canonical of "/" there tells Google every page is a copy of the homepage.
- Keep only site-wide facts in the layout. Set canonicals page by page.
This one is about our own site. During an SEO pass on aurelo.uk we found that 15 pages, including /contact and /services, were telling Google they were copies of the homepage. The cause was one line.
What went wrong
In the Next.js App Router, the root layout's metadata is the default for every page. Any page that doesn't set a value inherits it. Our root layout set a canonical URL:
export const metadata: Metadata = { title: { default: "Aurelo | SaaS Website Design & Development Agency", template: "%s | Aurelo", }, description: "SaaS website design, development & SEO...", metadataBase: new URL("https://aurelo.uk"), alternates: { canonical: "/", },}On the homepage, that's correct. On every page without its own canonical, it says "the real version of this page is the homepage". Google listens. Pages that say this get treated as duplicates, and duplicates don't rank.
Why it's easy to miss
Nothing looks broken. The pages load, the titles are right, and the canonical tag sits quietly in the head where nobody looks. You only find it by reading the HTML, or when Search Console starts listing pages where Google chose a different canonical.
The fix
We split metadata into two kinds.
- Site-wide facts live in the layout. The site URL, the title template, the default share image and the organisation details every page carries. We keep these in one file, src/lib/seo.ts.
- Page facts live on the page. The canonical, the title and the description. Every page sets its own canonical, even when it seems obvious.
// src/app/layout.tsx: site-wide defaults onlyexport const metadata: Metadata = { metadataBase: new URL(SITE_URL), title: { default: "Aurelo | SaaS Development Agency", template: "%s | Aurelo", }, description: SITE_DESCRIPTION,} // src/app/contact/layout.tsxexport const metadata: Metadata = { title: "Contact Us: Book a Strategy Call", alternates: { canonical: "/contact" },}How to check your own site
- Open a few inner pages, view the source and search for rel="canonical". Each one should point at the page itself.
- In Search Console, open the Pages report and look for "Duplicate, Google chose different canonical than user".
- Search your code for canonical inside layout files. Anything in a layout applies to every page below it.
The same goes for og:url and og:title. If they sit in a layout, every page shares them, and every link preview looks like your homepage.
The takeaway
Defaults are powerful because they spread. That is exactly why page-specific facts don't belong in them. If you run a Next.js site and haven't checked your canonicals, it takes five minutes. If you'd rather we look, our free audit covers it.
Keep reading
All notes
OptroGrowth3 min read
Show the product before the feature list
Buyers decide on proof, not promises. Why the first screen of a SaaS site should show the product doing its job, and how we build heroes that do.

QuackrGrowth2 min read
Answer the three questions people arrive with
Visitors arrive with a few questions and leave if the first screen ignores them. How we built Quackr's homepage around which country, which app and how much.