Hauntboard has 33 free tools in our maker tools hub. Thirty-one of them run entirely in your browser: pricing and MRR calculators, runway planners, churn math, payment fee breakdowns, timezone helpers and text generators. Zero backend requests, instant feedback, and zero Cloudflare Worker CPU cost no matter how many people share a link.
Two tools could not live in the browser alone: the Launch Readiness Checker and the Dofollow Link Checker. Because browsers enforce CORS, client-side JavaScript cannot fetch an arbitrary landing page or directory listing and read its raw HTML headers, meta tags, rel attributes or /robots.txt. That meant building a public server-side fetcher, and doing it without turning Hauntboard into an open proxy.
Why an Open URL Fetcher Is Dangerous
Any public endpoint that accepts a URL from an anonymous visitor and fetches it from your server invites three classic problems:
- Server-Side Request Forgery (SSRF): an attacker passes
localhost, a private IPv4 range, an IPv6 loopback address, or a public domain that returns a302redirect straight to an internal metadata IP. - Bandwidth and memory abuse: someone points the checker at a multi-gigabyte video file or a tarpit server that holds connections open forever, exhausting memory or function timeouts.
- Scraping relay abuse: automated scripts route thousands of requests through your server IP to scrape third-party sites under your user agent.
We also wanted to keep our Next.js Worker free of unpredictable outbound fetches. So instead of adding API routes to the web app, we built both tools as Convex HTTP endpoints (/tools/launch-readiness and /tools/dofollow-check in convex/http.ts), reusing the same hardened fetch layer we already run for the submit form's autofill endpoint.
The Guards Inside siteFetch.ts
Every outbound request from both checkers goes through fetchPublicText in convex/lib/siteFetch.ts, which enforces five strict rules before returning a single byte:
| Guard | What it does |
|---|---|
| Host allow-check | websiteHost allows only http: or https: URLs with a dotted public hostname; localhost, bare IPv4 addresses and bracketed IPv6 literals are rejected before any fetch runs |
| Manual redirect loop | Calls fetch with redirect: "manual" and resolves every 3xx Location header by hand, re-running websiteHost on every single hop, capped at 5 redirects |
| Hard timeouts | Uses AbortSignal.timeout at 8 seconds for HTML pages and 5 seconds for /robots.txt so slow origins cannot tie up workers |
| Streaming byte caps | Reads chunks through readCapped and cancels the stream once the cap is hit: 1 MB for launch readiness, 1.5 MB for link inspection, and 128 KB for robots.txt |
| Content-type check | Refuses non-HTML responses on page audits and ignores HTML error pages masquerading as robots.txt |
Checking redirects manually is the part teams skip most often. If you validate only the initial URL and leave automatic redirects on, any attacker can host a tiny redirector on a public domain and bounce your server into a private address on hop two. Re-validating every hop closes that door completely.
Privacy-Safe Rate Limiting
Both public endpoints share a token-bucket limit called siteAudit in convex/lib/rateLimits.ts: 20 checks per hour with a burst capacity of 6. That is plenty for a founder testing their landing page before launch day or checking a handful of directory listings, and far too tight to use as a scraping proxy.
Just like our visit counter (covered in how Hauntboard counts a visit and our privacy policy), we never store raw IP addresses for rate limiting. Each request hashes the client IP with a random salt that rotates every UTC day, and expired hashes are cleared automatically. Tomorrow, the same IP produces a completely unrelated key.
Separating Network I/O From HTML Parsing
All actual audit logic lives in convex/lib/siteAudit.ts as pure, zero-network functions: auditLaunchReadiness, evaluateRobotsForAgent and inspectLinksOnPage. Keeping parsing separate from fetching means we can unit-test tricky HTML, broken JSON-LD blocks, nested robots.txt rules and mixed rel attributes without touching the network.
For the Launch Readiness Checker, the parser evaluates twelve checks across HTTPS reachability, title and description length, meta robots, canonical URL, primary <h1>, Open Graph and X cards, favicon and viewport, JSON-LD syntax, sitemap declarations and crawler access for Googlebot, OAI-SearchBot, Claude-SearchBot and PerplexityBot.
For the Dofollow Link Checker, it inspects both individual <a> tags (nofollow, ugc, sponsored) and page-level <meta name="robots"> tags, separates direct links from indirect redirects, and tells you plainly when no link exists in the served HTML rather than guessing what client-side JavaScript might inject later. If a target site blocks requests with HTTP 403 or times out, the endpoint returns a clean 422 message explaining what happened instead of a generic error. Both checkers also sync their query inputs to the URL so you can share a live check with a teammate or co-founder. If you want to understand what those link attributes mean for a new domain, pair it with our guide to dofollow vs nofollow backlinks.