{
  "id": 19223225,
  "title": "Server-Side Rendering on Country Subdomains: What We Got Wrong First",
  "url": "https://urgent.news/2026/11/09/server-side-rendering-on-country-subdomains-what-we-got-wrong-first",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-09T21:33:50.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/slawekluzny/server-side-rendering-on-country-subdomains-what-we-got-wrong-first-om6"
  },
  "original_language": "en",
  "account": "The wire story covers the challenges faced by 24ad.info, a classifieds site with country-specific subdomains. Initially, the site struggled with ensuring proper first HTML responses and correct metadata for each country subdomain.\n\nIn April, they adjusted canonical URLs to match the subdomain the request originated from, and implemented a geo-redirect to send visitors to their respective country's subdomain. However, this redirect became a permanent 301 instead of the temporary 302 initially used.\n\nIn May, they attempted to inject data into the first HTML response for improved performance. While this worked well for listing pages, it caused issues on the home page where listings were country-specific. The injected data did not apply to the home page, leading to a mix of UK and global listings for users on their own country's home page. They quickly removed this feature.\n\nCurrently, the site renders the home page, listing pages, and category pages with custom metadata and initial data injected by the server. All other routes use the standard app template. Static assets are served directly from Caddy with long-term caching. The site block covers both the main domain and subdomains using a wildcard certificate.\n\nThe key takeaways from the story are that canonical URLs should be specific to each subdomain, the geo-redirect should exclude search engine bots, logged-in users, and users who explicitly select the global view, and pre-rendered data must be scoped to match the live page's country.",
  "summary": "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…",
  "key_points": [
    "24ad.info struggled with proper first HTML responses and metadata for country subdomains.",
    "Implemented geo-redirect as 301 instead of temporary 302, causing permanent redirection issues.",
    "Injected country-specific data into server-rendered pages, but caused mix of listings on home page."
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}