Menu

I built a browser game portal with Next.js: what I learned about SEO
📰

I built a browser game portal with Next.js: what I learned about SEO

DEV Community: nextjs·Pikiplay Games·about 24 hours ago
#VAVwAdNX
#devtonextjs#devto#dev#pages#game
Reading 0:00
15s threshold

I'm a Unity developer, and I recently built PikiPlay, a free browser game portal, with Next.js 15, Supabase and Tailwind. Games come from partner feeds plus a few of my own. The catalog keeps growing, so SEO couldn't be a one-time checklist. Here is what I ended up doing, and what I'd tell myself at the start.

One game, one URL Games used to be reachable by numeric id, by a partner code and by a few older slug spellings. To Google, that is duplicate content.

Now /game/[id] resolves the game, computes its canonical slug, and sends everything else there with a permanent redirect:

const canonical = gameSlug(game);

if (decodeURIComponent(id).trim() !== canonical) {

permanentRedirect( /game/${canonical} );

}

The page also sets a canonical URL in generateMetadata, so the redirect and the tag agree.

Sitemaps that survive a growing catalog A sitemap file is limited to 50,000 URLs, and my catalog only goes up.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.