Volleyball Elite Academy development update
|
Volleyball Elite Academy
Fix invalid robots.txt for Lighthouse SEO
|
Fix invalid robots.txt for Lighthouse SEOVolleyball Elite Academy — Development Update • May 21, 2026
Fix invalid robots.txt for Lighthouse SEO
What & Why Lighthouse's SEO audit flags the live site's as invalid. The current file has one bad line:
Per the [sitemaps.org spec](https://www.sitemaps.org/protocol.html#submit_robots), the directive must be an absolute URL (scheme + host + path), not a relative path. That single line is what breaks the audit. As a bonus problem, there is no actually being served, so the directive points at a 404 even once the URL is made absolute.
Done looks like
- Running Lighthouse against the deployed site no longer reports "robots.txt is not valid".
- returns a file whose line is an absolute URL pointing at a real, reachable .
- returns a valid XML sitemap (HTTP 200, ) listing the site's public, non-authenticated routes (home, alumni landing, events listing, store, etc. — whatever is actually public).
- The file works the same in dev (vite) and prod (Express static serving) — no env-specific drift.
Out of scope
- Adding meta tags, Open Graph, or per-page titles (separate SEO work).
- Auto-generating a sitemap from the database (e.g. per-event pages). A small static list of top-level public routes is enough for this pass.
- Submitting the sitemap to Google Search Console.
Steps 1. Make the Sitemap directive absolute — Update so the line uses the deployed absolute URL. Derive the host at request time (via the existing / helpers) by serving from an Express route instead of letting Vite serve the static file, so the same code works on and any preview deployment domain without hard-coding the host. 2. Add a minimal sitemap.xml route — Add an Express route at that returns a valid XML sitemap (matching ) listing the small set of public, crawlable URLs. Use the same base-URL helper so it matches whatever host the request came in on. Set . 3. Verify — Hit and in both dev and a fresh deploy, then re-run Lighthouse SEO and confirm the "robots.txt is not valid" warning is gone.
Relevant files - - - - -
|
Volleyball Elite Academy Reply to this email — we read every reply. You received this because you have an account with Volleyball Elite Academy. elitevolleyball.training |
|
No comments:
Post a Comment