On November 20, my main keyword dropped out of the Google top 10.
According to Google Search Console, over the 28-day window from November 6 to November 28, my site logged 1,450 impressions, 138 clicks, a 9.5% CTR, and an average position of 19.3. The query I cared about most—gd unblocked, which has around 2,900 monthly searches—had briefly broken into the top ten before sliding off the first page on November 20.
The weird part was how small the project is. It is a small static browser game site built with Astro and hosted on Vercel, launched about three months ago by me alone, with zero budget and zero team. The entire site has only 11 real pages. On paper, my on-page SEO audit scored 95 out of 100 and a design review gave it 7.5 out of 10. Nothing in the page copy had changed right before the drop.
So I stopped staring at the content and started looking at the URLs.
What Search Console and Ahrefs Actually Showed
I opened the Pages report in Google Search Console first. Instead of a clean list of 11 indexed pages, I was staring at split signals. Five URLs were flagged under "Page with redirect," while another 10 URLs were sitting in "Crawled - currently not indexed," including two actual content pages.
When I filtered the Performance report by page, I realized Google was splitting impressions between the apex domain and the www subdomain. At the same time, Ahrefs (as of December 3) showed 251 referring domains pointing to the project, yet my Domain Rating was still stuck at 0.
A static site with 11 pages should not have indexing friction like this. That realization pushed me to inspect the raw HTTP headers of my own pages instead of trusting what the Vercel dashboard claimed was happening.
Tracing the Four-Way URL Split
Running curl -I against my own routes exposed a mess I had accidentally assembled piece by piece over three months. Every page on the site could be reached—or bounced—through multiple combinations: www versus non-www, and trailing slash versus no trailing slash.
The first bug lived in astro.config.mjs and my JSON-LD breadcrumb component. Early on, I had set site: 'https://www.gdunblocked.com' in Astro's config. Because the @astrojs/sitemap integration builds every <loc> entry from that site property, all 11 URLs inside sitemap-0.xml carried the www prefix. Meanwhile, in the Vercel Domains panel, I had toggled on the default domain redirect from www to the apex domain.
That meant every single URL in my sitemap was triggering a redirect the moment Googlebot fetched it. To make things worse, my <link rel="canonical"> tags pointed to the non-www version, while my BreadcrumbList structured data hardcoded www on the last item without a trailing slash. Search Console was seeing a sitemap full of redirects, canonical tags disagreeing with structured data, and two hosts competing for the same 11 pages.
I fixed the Astro config and templates so everything generated non-www URLs with trailing slashes. That cleared up the HTML source, so I assumed the problem was solved.
It wasn't. Two more bugs were hiding in how Vercel routes static directories.
Two Wrong Turns in Vercel Routing
When Astro builds with trailingSlash: 'always' (Astro configuration reference), a route like /privacy-policy/ compiles to dist/privacy-policy/index.html. By default on Vercel, requesting /privacy-policy without the trailing slash also returned 200 OK directly instead of redirecting. Both the slashed and non-slashed URLs were serving identical HTML.
My first attempt to fix that was adding a one-line vercel.json:
{ "trailingSlash": true } That fixed /privacy-policy on the apex domain, turning it into a 308 redirect to /privacy-policy/. But when I tested https://www.gdunblocked.com/privacy-policy, I discovered two issues. First, Vercel's dashboard-level "Redirect to Another Domain" rule ran before vercel.json and blindly forwarded www/privacy-policy to non-www/privacy-policy, forcing Googlebot through two hops to reach /privacy-policy/.
So I switched www in the Vercel Domains panel to "Connect to an environment (Production)" to let vercel.json handle the host redirect in one hop. Even then, trailingSlash: true in vercel.json executed before my redirects array. A request to www without a trailing slash still bounced to www with a trailing slash first, rather than jumping straight to the apex domain.
My second wrong turn happened right after I removed "trailingSlash": true and tried to write everything inside the redirects array. Here is the exact configuration I deployed that failed:
{ "redirects": [ { "source": "/", "has": [{ "type": "host", "value": "www.gdunblocked.com" }], "destination": "https://gdunblocked.com/", "statusCode": 301 }, { "source": "/:path((?:[^/.]+/)*[^/.]+)", "has": [{ "type": "host", "value": "www.gdunblocked.com" }], "destination": "https://gdunblocked.com/:path/", "statusCode": 301 }, { "source": "/:path*", "has": [{ "type": "host", "value": "www.gdunblocked.com" }], "destination": "https://gdunblocked.com/:path*", "statusCode": 301 }, { "source": "/:path((?:[^/.]+/)*[^/.]+)", "destination": "/:path/", "statusCode": 301 } ] } When I tested www without a trailing slash, it returned 301 to the non-www slashed URL. I almost closed my terminal and called it a day. Out of habit, I ran one more check against https://www.gdunblocked.com/privacy-policy/—the www host with a trailing slash already attached.
It returned 200 OK.
The /:path* wildcard in Vercel's path-to-regexp matching had skipped paths ending with a trailing slash when a static index.html existed underneath. Anyone—or any crawler—visiting www with a trailing slash was still seeing a live duplicate copy of the site.
The Configuration That Finally Converged Everything
To lock down every path variant without breaking static files like ads.txt, robots.txt, or sitemap-0.xml, I kept Astro's config strictly aligned with the apex domain and trailing slashes:
import { defineConfig } from 'astro/config'; import tailwindcss from '@tailwindcss/vite'; import sitemap from '@astrojs/sitemap'; export default defineConfig({ site: 'https://gdunblocked.com', output: 'static', trailingSlash: 'always', integrations: [sitemap()], vite: { plugins: [tailwindcss()], }, }); Then I replaced the leaky /:path* rule in vercel.json with a regex capture group /(.*) per Vercel's project configuration docs. Ordering matters here: www rules sit at the top so host normalization and trailing-slash normalization happen in a single 301 hop, and the apex non-slashed rule sits at the bottom:
{ "redirects": [ { "source": "/", "has": [ { "type": "host", "value": "www.gdunblocked.com" } ], "destination": "https://gdunblocked.com/", "statusCode": 301 }, { "source": "/:path((?:[^/.]+/)*[^/.]+)", "has": [ { "type": "host", "value": "www.gdunblocked.com" } ], "destination": "https://gdunblocked.com/:path/", "statusCode": 301 }, { "source": "/(.*)", "has": [ { "type": "host", "value": "www.gdunblocked.com" } ], "destination": "https://gdunblocked.com/$1", "statusCode": 301 }, { "source": "/:path((?:[^/.]+/)*[^/.]+)", "destination": "/:path/", "statusCode": 301 } ] } The regex (?:[^/.]+/)*[^/.]+ intentionally ignores paths containing a dot, so requests for /ads.txt or /sitemap-index.xml on the apex host bypass the trailing-slash rule and serve 200 OK normally, while the www host still sends /ads.txt to https://gdunblocked.com/ads.txt in one 301 hop.
Once the URL layer on gdunblocked.com was consistent, I audited internal links across the site so no <a href> pointed to a redirecting path. Every internal link now uses a relative path ending with a slash. While cleaning those up, I added 13 contextual internal links inside body paragraphs, expanded the header navigation from 5 items to 6 by adding a Guides entry so orphaned guide pages had a site-wide path, and updated the main ranking page from 23 internal links to 28 while growing its copy from 1,216 words to 1,252 words.
What Changed After Deploying
Right after deploying the final vercel.json, I tested every route combination with curl -I:
-
/privacy-policyon the apex domain returns301to/privacy-policy/. -
/geometry-dash-vault-codeson the apex domain returns301to/geometry-dash-vault-codes/. -
https://www.gdunblocked.com/returns301directly tohttps://gdunblocked.com/. -
https://www.gdunblocked.com/privacy-policyreturns301directly tohttps://gdunblocked.com/privacy-policy/. -
https://www.gdunblocked.com/privacy-policy/returns301directly tohttps://gdunblocked.com/privacy-policy/. - All 11 entries in
sitemap-0.xmlmatch the exacthttps://gdunblocked.com/.../canonical format, as recommended in Google's duplicate URL consolidation guide.
That does not mean rankings snapped back overnight. As of December 3, Search Console still shows 10 URLs sitting in "Crawled - currently not indexed", including 2 content pages. I will check again in a couple of weeks to see whether consolidating the host and trailing slashes restores what was lost after November 20. Merging duplicate URLs fixes crawl waste; it does not force an immediate re-rank.
What I Actually Learned
If you run a small static site on Astro and Vercel, never assume the framework's trailingSlash setting and the hosting provider's domain redirect panel play nicely together. Vercel's dashboard redirect runs before vercel.json, vercel.json's trailingSlash flag runs before redirects, and /:path* behaves differently from /(.*) when trailing slashes meet static directory indexes.
Testing only the happy path—or only checking non-slashed redirects—hid the fact that www with a trailing slash was still returning 200 OK for months. Checking all four combinations with curl -I takes thirty seconds on launch day and would have saved an 11-page site from fighting itself in Search Console.