Most free SEO checkers grade a website as if it competed with the whole internet. A dental clinic or a bar in Alicante competes with the three or four businesses that show up next to it on Google Maps. I wanted a checker for that case, so I built one for MapaLocal, the local marketing project I run in Spain. It is live (in Spanish) at mapalocal.es/herramientas/analizador-seo.
This post is about how it is put together and the decisions behind it.
The idea: rules score, the model explains
The tool runs 20+ deterministic checks and turns them into a 0–100 score. A language model never decides the score. It receives the measured results and writes the action plan: what to fix first, why and how, in plain language for a business owner.
That split matters for two reasons:
- Reproducibility. The same page always gets the same score, and the thresholds are published on the page (title 30–65 characters, meta description 70–160, at least 300 words, alt text on 90%+ of images, server response under 1.5 s, and so on).
- Honesty. The model can be wrong about wording, but it cannot inflate or deflate the grade.
The checks are grouped into four blocks: basic SEO, content, technical/mobile and local SEO. The local block looks for things generic checkers ignore: LocalBusiness structured data, a visible tel: link, a WhatsApp link, a link to the Google Maps listing and whether the page mentions the city.
Architecture: isolated from the main site
The main site is WordPress. I did not want a tool that fetches arbitrary URLs running inside it, so the analyzer is a separate Cloudflare Worker:
- WordPress only renders the page and a small JS client.
- The Worker fetches the target page, extracts signals, runs the checks, calls the model and stores results.
- D1 (SQLite) holds a 7-day result cache, run logs, reports and unlock records.
Extraction uses HTMLRewriter, which streams the HTML instead of building a DOM. One gotcha: you can attach only one onEndTag handler per element, so JSON-LD capture and other script handlers had to be merged into one.
Fetching untrusted URLs safely
A "type any URL" box is an SSRF invitation. The fetcher:
- accepts only
http/httpson standard ports, with a URL length cap; - resolves the hostname over DNS-over-HTTPS first and refuses private, loopback and link-local addresses;
- follows redirects manually, re-validating every hop;
- uses timeouts and reads the body with a byte cap, truncating large pages instead of buffering them;
- downloads only the page itself,
robots.txtand the sitemap.
Abuse and cost controls
The model costs real money, so every layer has a limit:
- Cloudflare Turnstile on each request;
- a Workers rate limit binding for bursts per IP;
- a daily quota per visitor: 1 free analysis, 3 after leaving an email (an HMAC-signed unlock token tied to a recent report);
- a global daily budget: each run reserves an estimated cost before calling the model and settles to the real cost afterwards;
- cached results for 7 days, so re-analysing the same URL is free.
IPs are never stored in plain form, only a salted hash, and reports are deleted after 30 days.
The model call
The Worker uses the Anthropic TypeScript SDK with structured output defined by a Zod schema, so the response is validated JSON (priorities, impact, difficulty, steps, a proposed title and meta description) rather than free text I have to parse. If the model is unavailable, the user still gets the deterministic report.
PDF without a server
The full report downloads as a PDF, but the Worker does not render it. The browser already has every result on screen, so the PDF is built client-side with jsPDF, loaded on demand only when someone clicks the button. No extra server load, and no third service touching the data.
What I would tell anyone building a similar tool
- Keep the score deterministic and let the model explain it.
- Treat the URL input as hostile from day one.
- Put a budget cap in code, not just in a dashboard.
- Measure what matters to your users. For local businesses that is a tap-to-call phone and a Maps link more than a Lighthouse score.
The tool is free and needs no sign-up. Feedback is welcome, especially from people who build for small businesses.
![[AWS] Illustrated Guide to What's Changed in Ops Agent: Organizing the Renaming, Code Change Risk Analysis, Expert and Cross-Team Surveys [Ops Agent]](https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fqiita-user-contents.imgix.net%2Fhttps%253A%252F%252Fqiita-user-contents.imgix.net%252Fhttps%25253A%25252F%25252Fcdn.qiita.com%25252Fassets%25252Fpublic%25252Farticle-ogp-background-afbab5eb44e0b055cce1258705637a91.png%253Fixlib%253Drb-4.1.1%2526w%253D1200%2526blend64%253DaHR0cHM6Ly9xaWl0YS11c2VyLXByb2ZpbGUtaW1hZ2VzLmltZ2l4Lm5ldC9odHRwcyUzQSUyRiUyRnMzLWFwLW5vcnRoZWFzdC0xLmFtYXpvbmF3cy5jb20lMkZxaWl0YS1pbWFnZS1zdG9yZSUyRjAlMkYxOTI5NDklMkYxYmVjZGE4YTRmMWRiOWU5OTQyZDljOGMwYjZkZDA3NjkwMTM2NjgwJTJGbGFyZ2UucG5nJTNGMTc0MTQ4MzQxMD9peGxpYj1yYi00LjEuMSZhcj0xJTNBMSZmaXQ9Y3JvcCZtYXNrPWVsbGlwc2UmYmc9RkZGRkZGJmZtPXBuZzMyJnM9MDZlM2QxY2EzNTVhN2Y4N2M2ZTQxY2RlYzdmN2M0ODI%2526blend-x%253D120%2526blend-y%253D462%2526blend-w%253D90%2526blend-h%253D90%2526blend-mode%253Dnormal%2526mark64%253DaHR0cHM6Ly9xaWl0YS1vcmdhbml6YXRpb24taW1hZ2VzLmltZ2l4Lm5ldC9odHRwcyUzQSUyRiUyRnMzLWFwLW5vcnRoZWFzdC0xLmFtYXpvbmF3cy5jb20lMkZxaWl0YS1vcmdhbml6YXRpb24taW1hZ2UlMkYxZTIwZGI1ZTdlNDA3ZWFlN2I5NzBlYzk5OTg4MGRjOGMzY2MwZjY0JTJGb3JpZ2luYWwuanBnJTNGMTY2NzI3NDk2Mz9peGxpYj1yYi00LjEuMSZ3PTQ0Jmg9NDQmZml0PWNyb3AmbWFzaz1jb3JuZXJzJmNvcm5lci1yYWRpdXM9OCZiZz1GRkZGRkYmYm9yZGVyPTIlMkNGRkZGRkYmZm09cG5nMzImcz04OTI0NDcwMDk1MDMyZjUxYmZlNzE3ZjVkOGUzYmE3ZA%2526mark-x%253D186%2526mark-y%253D515%2526mark-w%253D40%2526mark-h%253D40%2526s%253D0db13b4aef231a19bc684897cf15021a%3Fixlib%3Drb-4.1.1%26w%3D1200%26fm%3Djpg%26mark64%3DaHR0cHM6Ly9xaWl0YS11c2VyLWNvbnRlbnRzLmltZ2l4Lm5ldC9-dGV4dD9peGxpYj1yYi00LjEuMSZ3PTk2MCZoPTMyNCZ0eHQ9JUUzJTgwJTkwQVdTJUUzJTgwJTkxJUU1JTlCJUIzJUU4JUE3JUEzJTIwT3BzJTIwQWdlbnQlRTMlODElQUYlRTQlQkQlOTUlRTMlODElOEMlRTUlQTQlODklRTMlODIlOEYlRTMlODElQTMlRTMlODElOUYlRTMlODElQUUlRTMlODElOEIlMjAlRTYlOTQlQjklRTclQTclQjAlRTMlODMlQkIlRTMlODIlQjMlRTMlODMlQkMlRTMlODMlODklRTUlQTQlODklRTYlOUIlQjQlRTMlODMlQUElRTMlODIlQjklRTMlODIlQUYlRTUlODglODYlRTYlOUUlOTAlRTMlODMlQkIlRTUlQjAlODIlRTklOTYlODAlRTUlQUUlQjYlRTMlODMlQkIlRTMlODMlODElRTMlODMlQkMlRTMlODMlQTAlRTYlQTglQUElRTYlOTYlQUQlRTglQUElQkYlRTYlOUYlQkIlRTMlODIlOTIlRTYlOTUlQjQlRTIlODAlQTYmdHh0LWFsaWduPWxlZnQlMkN0b3AmdHh0LWNvbG9yPSUyMzFFMjEyMSZ0eHQtZm9udD1IaXJhZ2lubyUyMFNhbnMlMjBXNiZ0eHQtc2l6ZT01NiZ0eHQtcGFkPTAmcz0zZWJmYjNlNzM1M2FmNTkyZTRmMGRjNmE5YmFkZWRiNw%26mark-x%3D120%26mark-y%3D112%26blend64%3DaHR0cHM6Ly9xaWl0YS11c2VyLWNvbnRlbnRzLmltZ2l4Lm5ldC9-dGV4dD9peGxpYj1yYi00LjEuMSZ3PTgzOCZoPTU4JnR4dD0lNDBOYW5hXzc3NyZ0eHQtY29sb3I9JTIzMUUyMTIxJnR4dC1mb250PUhpcmFnaW5vJTIwU2FucyUyMFc2JnR4dC1zaXplPTM2JnR4dC1wYWQ9MCZzPTg1YzQ4MzUyMmVkMGVhNmYxYjhkZjU5MjVjYzhiNjQz%26blend-x%3D242%26blend-y%3D454%26blend-w%3D838%26blend-h%3D46%26blend-fit%3Dcrop%26blend-crop%3Dleft%252Cbottom%26blend-mode%3Dnormal%26txt64%3DS0RESeOCouOCuOODo-OCpOODq-mWi-eZuuOCu-ODs-OCv-ODvOagquW8j-S8muekvg%26txt-x%3D242%26txt-y%3D539%26txt-width%3D838%26txt-clip%3Dend%252Cellipsis%26txt-color%3D%25231E2121%26txt-font%3DHiragino%2520Sans%2520W6%26txt-size%3D28%26s%3D5b0e56b77e36f5eee922c03d15aeeff1)