Skip to main content
Initializing

Software Developer

Loading 0%
Saymon Arefin Akash — homeSaymon A. Akash
Back to Blogs
Recent5 min readUpdated Dec 01, 2026

Fixing 'Page with redirect' in Google Search Console (Nuxt + Netlify Trailing Slashes)

How I fixed "Page with redirect" in Google Search Console on a Nuxt site hosted on Netlify: trailing-slash links, canonical tags, sitemap and 301s.

Today I fixed a set of "Page with redirect" warnings in Google Search Console on this portfolio. The cause was a mismatch between the URLs my Nuxt app linked to (/about) and the URLs Netlify actually serves (/about/). Every internal link, canonical tag and sitemap entry pointed at a URL that answered with a 301. The fix was small, but it touched five places, and missing any one of them would have left the problem half solved. This is the full write-up, with the real config from the commit.

If you want the bigger picture on Nuxt and search first, start with Is Nuxt Good for SEO?. This post is the deep dive on one specific problem.

The symptom

In Search Console, under Indexing > Pages, the "Why pages aren't indexed" table had two rows that did not belong there:

  • Page with redirect, listing URLs like https://saymonakash.me/about and https://saymonakash.me/blog/gsap-vue3.
  • Not found (404), for an old URL, /blog/about-saymon-arefin-akash/, from an earlier version of the site.

"Page with redirect" on its own is not an error. It just means Google found a URL that redirects and indexed the target instead. The problem is where Google found those URLs: on my own site. If your navigation, your canonical tags and your sitemap all point at redirecting URLs, you are telling Google one thing and serving another. That wastes crawls and makes canonicalization less predictable.

The cause: static output and Netlify

This site is a Nuxt 4 app built with nuxt generate and deployed as static files with the netlify-static Nitro preset. During prerendering, Nuxt writes each route as a folder with an index.html inside:

dist/
  about/index.html
  blog/gsap-vue3/index.html
  contact/index.html

Netlify serves dist/about/index.html at /about/. A request for /about, without the slash, gets a 301 to /about/. You can see it with curl:

curl -sI https://saymonakash.me/about | grep -iE '^(HTTP|location)'

Meanwhile, Nuxt's defaults produce URLs without a trailing slash everywhere: <NuxtLink to="/about"> renders href="/about", and my blog template built the canonical URL as ${site.url}/blog/${slug}. So every link Google followed went through a redirect, and every canonical tag pointed at a URL that was not the final one.

Step 1: tell site config which convention you use

The Nuxt SEO modules (sitemap, robots, schema-org, seo-utils) read a shared site config. Its trailingSlash option, which defaults to false, tells them whether the URLs they generate should end with a slash. I had already set it on this site:

// nuxt.config.ts
export default defineNuxtConfig({
  site: {
    url: 'https://saymonakash.me',
    trailingSlash: true,
  },
})

This is necessary but not enough. Site config does not change your <NuxtLink> output, and it does not change URLs you build by hand in your own components. That was exactly my gap.

Nuxt lets you override the defaults for <NuxtLink> in nuxt.config.ts. One of those options is trailingSlash, which takes 'append' or 'remove':

// nuxt.config.ts
export default defineNuxtConfig({
  // Netlify serves prerendered pages at `/path/` and 301s `/path` → `/path/`.
  // Make every <NuxtLink> emit the trailing-slash URL so crawlers never hit
  // the redirect (Search Console "Page with redirect").
  experimental: {
    defaults: {
      nuxtLink: { trailingSlash: 'append' },
    },
  },
})

Now <NuxtLink to="/about"> renders <a href="/about/">. I did not have to touch a single template. If you only need it on one link, there is also a prop:

<NuxtLink to="/about" trailing-slash>About</NuxtLink>

The option lives under experimental.defaults, and the Nuxt docs say these defaults may move somewhere else in the future, so check the docs when you upgrade.

trailingSlash: 'append' only affects links rendered by <NuxtLink>. Plain strings elsewhere are your job. In my case some project cards in a composable used url: '/experiments', which I changed to '/experiments/'.

Step 3: fix the canonical and og:url

This was the most important change. My blog post template built the canonical URL by hand, and it was missing the slash:

 // pages/blog/[slug].vue
 const site = useSiteConfig()
-const canonical = `${site.url}/blog/${route.params.slug}`
+const canonical = `${site.url}/blog/${route.params.slug}/`

The same canonical value feeds both the <link rel="canonical"> and og:url:

useSeoMeta({
  ogUrl: canonical,
  // ...title, description, images
})

useHead({
  link: [{ rel: 'canonical', href: canonical }],
})

A canonical tag that points at a redirect is a contradictory signal: "the real version of this page is that other URL", and that other URL says "no, go back over there". Google usually works it out, but you should not make it guess. The rule is simple: the canonical must be the exact URL that returns a 200.

If you use nuxt-seo-utils without overriding the canonical yourself, it builds the canonical from your site config and the current route, so the trailingSlash setting from step 1 is what you want it to read. I set mine manually in this template, which is why I had to fix it manually.

Step 4: check the sitemap and llms.txt

Your sitemap should list only final, indexable URLs. Open /sitemap.xml after a build and check every <loc>. On this site, the sitemap is generated by @nuxtjs/sitemap from the auto-discovered pages plus a server source for the blog posts, and it reads the same site config.

I also generate /llms.txt with nuxt-llms. Its links are plain strings in nuxt.config.ts, so trailingSlash does not touch them. I updated them by hand:

// nuxt.config.ts
llms: {
  sections: [
    {
      title: 'Portfolio',
      links: [
        { title: 'About', href: '/about/' },
        { title: 'Projects', href: '/projects/' },
        { title: 'Contact', href: '/contact/' },
      ],
    },
  ],
},

Anywhere you write a URL as a string (config files, JSON-LD, markdown content, email templates), search for it after a change like this. I grep for href: '/ and to: '/ and read every hit.

Step 5: 301 the old URL that returns a 404

The 404 in Search Console was a different problem with the same theme. An older version of the site had an about page at /blog/about-saymon-arefin-akash/. That page no longer exists, but Google still had it on record, and possibly some external sites still link to it. A 404 is the correct response for content that is really gone, but this content had moved to /about/, so a permanent redirect is the honest answer.

On a static Netlify site, the redirect goes in netlify.toml:

# Old URL that Google still has on record — send it to the About page.
[[redirects]]
  from = "/blog/about-saymon-arefin-akash"
  to = "/about/"
  status = 301
  force = true

[[redirects]]
  from = "/blog/about-saymon-arefin-akash/"
  to = "/about/"
  status = 301
  force = true

I added both versions, with and without the slash, so either form of the old URL lands on the right page in one hop. force = true makes Netlify apply the rule even if a file exists at that path. Note that the target, /about/, already has the trailing slash. Redirecting to /about would create a redirect chain: old URL to /about, then /about to /about/.

Step 6: verify before you deploy

Before pushing, I check four things on the generated output:

  1. Internal links. Run nuxt generate, open a few pages from dist/, and confirm href values end with /. View Source, not DevTools, because you want the server HTML.
  2. Canonical and og:url. Same pages, check <link rel="canonical"> and <meta property="og:url">.
  3. Sitemap. Every <loc> in /sitemap.xml uses the final URL.
  4. Redirects. After deploy, curl the old URL and the no-slash version of a page and confirm there is exactly one 301 to the right place.

If you use @nuxtjs/seo, it includes nuxt-link-checker, which has a trailing-slash rule that flags internal links that do not match your site config. It is a good safety net for this exact bug.

Step 7: Validate Fix in Search Console

Once the fix is live:

  1. Open Indexing > Pages in Search Console.
  2. Click the Page with redirect row.
  3. Click Validate Fix.
  4. Do the same for Not found (404).

Validation tells Google to recrawl the affected URLs. It is not instant. Google says it can take up to about two weeks, and on a small personal site that Google does not crawl often, it can take longer. You can also use the URL Inspection tool on a couple of key pages and click Request Indexing to speed those up.

Expect the redirecting URLs to stay in the "Page with redirect" report for a while. That is fine. The bare /about URL will always redirect, and Google will keep listing it as long as it knows about it. What matters is that the trailing-slash versions show up as indexed, and that nothing on your own site points at the redirecting version anymore.

What I would do differently

I should have picked the URL convention on day one and checked it against the host before writing any links. The lesson generalizes beyond Netlify: find out what URL your host returns a 200 for, then make links, canonicals, og:url, the sitemap and structured data all agree with it. If your host serves URLs without a slash, the same fix works with trailingSlash: false and 'remove'.

This is one of those problems that a framework cannot solve for you, because it depends on where you deploy. I cover the other things to get right in the complete Nuxt SEO guide, and if you are weighing frameworks, the trailing-slash defaults are one of the differences I mention in Nuxt vs Next.js for SEO.

Need help?

If Search Console is full of redirect, canonical or "Crawled, currently not indexed" warnings on your Nuxt site, I can help track them down. Have a look at my services or contact me with a screenshot of your Pages report.

Frequently asked questions

What does Page with redirect mean in Google Search Console?
It means Google found a URL that redirects somewhere else, so it indexed the destination instead of that URL. It is not an error by itself, but if the redirecting URLs come from your own links, canonical tags or sitemap, you are sending Google mixed signals.
Why does Netlify redirect my Nuxt pages to a trailing slash?
When you prerender a Nuxt site with nuxt generate, each page is written as a folder with an index.html file. Netlify serves that file at the URL with a trailing slash and redirects the version without the slash to it.
How do I make NuxtLink add a trailing slash?
Set experimental.defaults.nuxtLink.trailingSlash to append in nuxt.config.ts. Every NuxtLink then renders its href with a trailing slash. You can also use the trailing-slash prop on a single link.
Should my canonical URL have a trailing slash?
Your canonical URL should be the exact URL your server returns with a 200 status. On a Netlify static Nuxt site that is the trailing-slash version, so the canonical, og:url, sitemap and internal links should all end with a slash.
How long does Validate Fix take in Search Console?
It depends on how often Google crawls your site, and Google says validation can take up to about two weeks or longer. Small sites with few pages may need longer, because Google recrawls them less often.