Dev.to WebDev 🛠 Dev 👁 0 📖 3 min read

My Game Site Had a Shadow Copy Google Was Indexing Instead — Two Canonical Bugs That Cost Me a Month

Two weeks ago I wrote about running GameHubStar, a free HTML5 game arcade, on a $10.46/year domain and nothing else: GitHub Pages for hosting, a Cloudflare Worker + D1 (SQLite) API for the game index, React/Vite on the f

Two weeks ago I wrote about running GameHubStar, a free HTML5 game arcade, on a $10.46/year domain and nothing else: GitHub Pages for hosting, a Cloudflare Worker + D1 (SQLite) API for the game index, React/Vite on the frontend, and GameMonetize embeds for the games themselves. At that point the site had 532 games and 48 pages indexed by Google.

Today is day 49. The site has 598 games, a 636-URL sitemap, and — according to a Search Console coverage export from December 3 (data through November 27) — 172 pages indexed. That jump didn't come from writing more content. It came from finding two boring configuration bugs that had been quietly splitting my site in half.

Bug 1: http:// never redirected to https://

GitHub Pages serves your site over HTTPS, but if you put Cloudflare in front of it, the redirect from http to https is a setting you have to turn on ("Always Use HTTPS"). I hadn't.

The result: Google crawled a complete shadow copy of my site over plain http. When I exported the coverage report, all 34 "soft 404" pages were http URLs, and most of the 568 "crawled, currently not indexed" pages were http too. Google was spending its small crawl budget for a brand-new site on duplicate http pages, then declining to index them because the https versions already existed. From my side it just looked like "indexing is slow." It wasn't slow — it was misdirected.

The fix took one toggle in Cloudflare, verified with curl: http now returns a 301 to https for the homepage and game pages alike. The shadow copy will drain out of the index over the next crawl cycles; the December 18 coverage check is my checkpoint for whether it actually does.

Bug 2: a static canonical tag pointing every page at the homepage

My site is a single-page app. The static index.html shell originally carried a hard-coded canonical link pointing at the homepage. JavaScript rewrote the canonical at runtime for category and game pages, so in a browser everything looked correct.

Google, however, reads the initial HTML first — and it trusted the static version. My 10 collection pages (category hubs like action, puzzle, driving) were being treated as duplicates of the homepage, because as far as the raw HTML was concerned, they all declared the homepage as their canonical URL.

The fix: remove the static canonical from the shell entirely, let each route set its own canonical, and add a fallback in my static page generator so every pre-rendered game page inserts its own self-referencing canonical if one is missing. I verified it on a single game page first, then shipped it.

What the numbers look like now

  • 598 games, 5 new ones added per day by an automated pipeline that playtests each game in a headless browser before listing it
  • 636 URLs in the sitemap
  • 172 pages indexed (coverage export, data through Nov 27), up from 48 two weeks earlier
  • Last 7 days: 8 clicks, 319 impressions, 2.5% CTR, average position 21.9
  • Last 28 days: 13 clicks, 449 impressions, average position 20.6
  • Revenue: still $0. AdSense application is planned once the indexed pages are thick enough — 103 game pages currently have a 250–400 word original review

The manual index-request experiment from my last post is still running: I submit 10 URLs a day by hand in Search Console (3 new games, 5 older pages, 2 hub pages). Slow, unglamorous, and still the only lever with a measurable effect.

Lessons I'd pass on

  1. Check the boring layer first. Before rewriting content or chasing backlinks, curl your own site: does http redirect? What does the raw HTML say the canonical is? A SPA shell can lie to you in ways the rendered page never shows.
  2. Export the coverage report and read the actual URLs. The aggregate counts ("568 crawled, not indexed") told me nothing. The URL list told me everything — the http pattern was obvious within a minute of looking.
  3. Free tier is still enough. GitHub Pages + Workers + D1 + a $10.46 domain runs 598 games and daily automation without a bill. The scarce resource was never hosting; it was Google's crawl budget, and I was wasting half of it on a shadow site.
  4. Date your claims. Every number above has a source and a date, because GSC data lags 2–3 days and a coverage export is a snapshot, not a live feed. Writing "172 indexed" without "as of Nov 27" would be a small lie that compounds.

Next checkpoint is December 18: if the http shadow pages drain and the collection pages start indexing as themselves, the two fixes did their job. If not, I'll write about that too.

The site, for the curious: gamehubstar.com — 598 free browser games, no sign-up.

📰 Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.