Angular crawlability without SSR — DoifyNow case study
How DoifyNow generates route-specific initial HTML, a verified sitemap and real 404s from its Angular router at build time, with sources and limitations.
Bartosz Litwa, founder · Written 22 October 2026
The problem
DoifyNow's public website is an Angular standalone application served as static files by an unprivileged nginx container. Like many single-page apps, nginx answered every unknown path with the same index.html so that the client-side router could take over.
That fallback is convenient for people but misleading for crawlers and link previews. Before JavaScript ran, every route carried the home page title, description and canonical URL, and a mistyped address returned HTTP 200 instead of 404. Product profiles, legal pages and the contact page all looked like copies of the home page.
Read the router as the source of truth
A small Node build script parses app.routes.ts and routes.const.ts with the TypeScript compiler API and extracts each route's path, title key, description key and robots value. Non-literal values, duplicate paths and missing translations fail the build instead of producing silent gaps.
Write one HTML document per route
After the Angular build, the script copies the compiled index.html for each route and replaces the title, description, canonical, robots, Open Graph and Twitter values. It also inserts a short visible overview from the same English catalog, which Angular replaces when the application starts.
Verify the sitemap instead of trusting it
The sitemap stays a reviewed file, but the build fails unless it lists every indexable route exactly once, uses only the canonical HTTPS origin and leaves out private or noindex routes.
Serve real files and real 404s
nginx now tries the exact file, then the route's .html document, and otherwise returns a branded 404 page with a 404 status. Trailing slashes and .html suffixes redirect with 308 to one canonical form.
Fix what a crawl actually found
An Ahrefs site audit on 20 October 2026 reported eight broken internal links. All of them came from the CDN's email obfuscation rewriting public mailto links into an email-protection path that returned 404. Narrow email_off markers around those links, plus a regression test, removed the rewrite without changing any address.
Verifiable result
Every production build now writes route-specific initial HTML for each declared route, including noindex private routes and the 404 page, and runs the SEO, Content Security Policy and cache-policy checks before the container image is assembled.
Ahrefs reported a site health score of 91 for its crawl at 17:43 UTC on 20 October 2026 and 99 for a fresh crawl at 21:44 UTC the same day. That is a crawler's score after several fixes, not a ranking, traffic or revenue result.
You can check the public behavior yourself: view the source of any DoifyNow page before JavaScript runs, request a missing path and look for a 404 status, or compare the sitemap with the visible navigation.
Limitations and open work
The initial overview uses the English catalog. Polish and Spanish text appears only after Angular loads.
There is no hydration: Angular replaces the static overview when it mounts, so the approach suits short public pages better than large interactive ones.
Route data must use plain string literals that the script can read. Computed paths need an explicit update to the reader.
At the last audit, plain-HTTP requests to the bare domain still returned 200 instead of redirecting to HTTPS. That edge-routing fix sits outside this repository and remains open.
A passing build or HTTP response does not prove which revision is deployed or what search engines have indexed.
Development stages describe the portfolio direction. Features, access, and availability vary by product; a listing does not mean every planned feature is live.