Menu

Server-Side Rendering on Country Subdomains: What We Got Wrong First
πŸ“°

Server-Side Rendering on Country Subdomains: What We Got Wrong First

DEV Community: frontendΒ·slawekluznyΒ·about 19 hours ago
#PmQKpwbh
#devtofrontend#devto#dev#country#info
Reading 0:00
15s threshold

Server-Side Rendering on Country Subdomains: What We Got Wrong First

24ad.info is a classifieds site where every country has its own subdomain β€” pl.24ad.info , de.24ad.info , gb.24ad.info β€” all served by one app. The frontend is a React 19 single-page app built with Vite, running on Express behind Caddy, with everything behind Cloudflare.

A single-page app has a well-known weakness: the first HTML a visitor (or a search engine) receives is mostly empty. Getting real content and correct metadata into that first response, per country , took a few rounds. Here they are, including the one we rolled back the same day.

Round 1 (April): canonical URLs and the geo-redirect

The first problems were about which URL counts as "the" page.

Canonical URLs always pointed at the main domain. A category page on pl.24ad.info told search engines its canonical address was the home page of 24ad.info .…

Continue reading β€” create a free account

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