Menu

Post image 1
Post image 2
1 / 2
0

How I Added Pre-Rendering to a Vite Multi-Page App Without SSR

DEV Community·Bright Agbomado·22 days ago
#WiStdKLE
#javascript#webdev#seo#vite#tool#html
Reading 0:00
15s threshold

I run RelahConvert , an online file conversion site with 50+ tools across 25 languages. Last week I noticed a problem in my Ahrefs audit: every single one of my 1,449 pages was flagged as "H1 missing" and "Low word count." The pages weren't empty. They had H1s, descriptions, FAQs — all rendering correctly when you visited them. But here's what crawlers were seeing: Yep. Empty. The Setup The site is a Vite MPA (multi-page app), not a SPA. Each tool has its own .html file. Tool-specific JavaScript injects the page content at runtime via document.querySelector('#app').innerHTML = template. This works great for users. The page loads, JS runs, content appears. Fast and clean. But it breaks for crawlers that don't execute JavaScript (Ahrefs, basic bots, social media scrapers like Facebook and X). They see an empty body. Even Google, which does run JS, has a delayed second-pass rendering that costs crawl budget and makes new pages slow to index.…

Continue reading — create a free account

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

Read More