The site I run about GTA6 is built with Astro and served as completely static HTML. It has an English version and a Chinese version, with every page existing in both. No server, no runtime translation, no CMS.
Here is what I learned doing it.
Prefix the default language too
My first version put English at the root and Chinese under /zh/. It worked, but it made canonical tags and hreflang messy, and switching languages felt inconsistent. I switched to prefixDefaultLocale: true so that English lives at /en/, Chinese at /zh/, and the bare root just redirects.
A 301 on / to /en/ in a _redirects file is all it takes on Cloudflare Pages. Clean URLs, unambiguous canonicals, one x-default that actually points somewhere.
x-default is not optional
Google's docs mention hreflang="x-default" in passing, but for a site with two languages it is the tag that decides who lands where. I point it at /en/ because English is the wider audience. Getting this wrong is silent — nothing breaks, you just lose the right traffic.
Generate the metadata, do not hand-write it
There are 130 content pages. Hand-writing canonical and hreflang tags for each is a recipe for mistakes. I generate them from the route in the layout component. The sitemap is generated the same way, with per-locale priorities so /en/ outranks /zh/.
The one thing I did hand-write was llms.txt, then replaced that with a script too, because I kept forgetting to add new pages.
Keep the crawler out of the way
I initially had Disallow: /_astro/ in robots.txt, which blocked the CSS and JS bundles. Google renders with JavaScript, so blocking the assets makes the rendered page look broken. I removed the rule. Static assets should be crawlable.
That is really the whole trick: generate the boring metadata, let the crawler see everything, and keep the runtime at zero.
Top comments (0)