When we were asked to build a Chinese lottery reference site at a Punycode domain (xn--jor23ybuq47er4m.com, which displays as a Chinese character domain in browsers), we knew this would not be a typical React project. The brief covered a bilingual audience, a design language with strong cultural expectations, and two search engines to satisfy instead of one.
Here is how we tackled the unique challenges of building a lottery reference platform targeting the Chinese-speaking market.
Why React and Vite Instead of Next.js
The site has no user accounts, no per-request data, and no server-side logic beyond generating a deterministic number from a date. That ruled out Next.js from the start -- we did not need SSR, API routes, or a Node runtime sitting on the server just to serve HTML that never changes between requests.
None of this means Next.js is wrong for other projects -- for a site with logins, checkout flows, or live data, we would reach for it. For a static reference site read by two very different search engines, a lighter stack won.
The IDN Domain Challenge
International Domain Names (IDN) use Punycode encoding to represent non-ASCII characters in DNS. Our domain contains Chinese characters, which means:
Noto Sans SC Font Optimization
Chinese fonts are massive. Noto Sans SC (Simplified Chinese) is over 8MB for all weights. Loading this naively would destroy PageSpeed scores. Our optimization strategy:
1. Subset the font
We only include the most common 6,000 characters plus our specific lottery terminology. This reduces the font file from 8MB to about 2MB.
2. Use font-display: swap
The page renders immediately with system fonts, then swaps in Noto Sans SC once loaded. Users see content instantly with a brief font flash.
3. Preload the primary weight
We preload the Regular (400) weight in the HTML head and lazy-load Bold (700) only when needed. Most lottery content uses regular weight.
4. Self-host via Google Fonts CSS
Instead of loading from Google Fonts CDN (which is blocked in mainland China), we self-host the font files on our server and proxy through Cloudflare.
Red-Gold Chinese Design System
Lottery sites in the Chinese market follow strong design conventions. Red represents luck and prosperity. Gold represents wealth. We built a design system around these cultural expectations:
Deterministic Number Generator
The site generates daily lucky numbers for various lottery games. These numbers must be deterministic -- the same date always produces the same numbers -- so that users see consistent results regardless of when they load the page or which server (if we ever scale to multiple) handles the request.
We implemented a seeded random number generator using the current date as the seed. The algorithm combines a simple hash function with a linear congruential generator:
This approach means no backend is needed for number generation. The entire site is static and can be pre-rendered.
Working Without a Backend
The no-backend decision shaped everything downstream, and it came with real trade-offs we had to weigh with the client upfront:
Baidu SEO Considerations
Ranking on Baidu requires different strategies than Google. Key differences we addressed:
Performance Engineering and Core Web Vitals
Because the audience skews mobile and often on slower connections, we treated PageSpeed as a hard requirement, not a nice-to-have:
Site Architecture: 37 Pages
The site covers multiple lottery games and fortune telling methods:
Each page is pre-rendered via Puppeteer for SEO, producing fully static HTML that both Google and Baidu can index without executing JavaScript.
Lessons Learned
1. Test on Chinese browsers
QQ Browser and UC Browser handle CSS differently from Chrome. We tested on both and found minor layout issues with flexbox gap.
2. Font loading is the biggest performance bottleneck
Everything else (images, JS, CSS) was under 200KB. The Chinese font dominated load time until we optimized it.
3. Cultural design conventions matter
Our first design iteration used a modern minimalist approach. User feedback was clear: it did not feel like a legitimate lottery site. The red-gold redesign immediately improved engagement metrics.
4. Verify indexing manually on IDN domains
Standard rank trackers and some SEO dashboards mishandle Punycode domains, showing zero data even after both Google Search Console and Baidu Webmaster Tools confirmed pages were indexed. We learned to trust the search console data directly rather than third-party tooling for this project.
Conclusion
Building for the Chinese market requires attention to cultural design norms, font optimization, and dual search engine strategy. React and Vite made the development fast and the static-first architecture kept hosting simple, but the real work was in understanding how Baidu, Chinese browsers, and Chinese users differ from the Google-first, Chrome-first assumptions baked into most web tooling.
Need a bilingual or China-facing website built the same way -- static-first, prerendered for SEO, tuned for the search engines your audience actually uses? Get a free quote and we will walk through the architecture that fits your project.
