Skip to content

fix(seo): stop serving the homepage for unknown URLs, drop junk sitemap entries - #126

Merged
idanlodzki merged 1 commit into
mainfrom
fix/seo-soft-404s-and-sitemap
Aug 30, 2026
Merged

fix(seo): stop serving the homepage for unknown URLs, drop junk sitemap entries#126
idanlodzki merged 1 commit into
mainfrom
fix/seo-soft-404s-and-sitemap

Conversation

@idanlodzki

@idanlodzki idanlodzki commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Found while investigating why pages on opsimate.dev are missing from Google. Companion PR on the website side: OpsiMate/opsimate-website#109.

Search Console currently reports 8 pages as "Crawled – currently not indexed", and almost all of them are docs.opsimate.dev. I inspected /docs/integrations/grafana directly: crawl allowed, fetch successful, indexing allowed, self-referential canonical, crawled that morning. There is no technical blocker on the page itself — so this PR goes after the two things that do degrade how Google sees the docs domain as a whole.

1. The SPA rewrite turned every 404 into a soft 404

vercel.json sent every filesystem miss to /index.html:

"rewrites": [{ "source": "/(.*)", "destination": "/index.html" }]

So any nonexistent docs URL answered 200 with the homepage:

$ curl -o /dev/null -w '%{http_code}' https://docs.opsimate.dev/this-page-does-not-exist-xyz123
200

Google logs those as soft 404s and burns crawl budget on them, and the real 404 page could never render.

The rewrite was never needed. Docusaurus prerenders a directory per route and Vercel resolves clean URLs from the filesystem on its own — which is exactly why real pages have always served their own content while only misses fell through to the homepage. The build still emits 404.html, which Vercel now serves.

2. Junk in the sitemap

  • /search — the Algolia results page, no content of its own. It is one of the 8 URLs Google reports as crawled-but-not-indexed. Now excluded via sitemap.ignorePatterns.
  • /markdown-page — the leftover Docusaurus starter template ("You don't need React to write simple standalone pages"). It was a live public URL and a sitemap entry. Deleted.

Sitemap goes from 37 to 35 URLs.

Verification

Built locally: sitemap is 35 URLs with both junk entries gone, 404.html still generated, /markdown-page route no longer emitted, all real routes unchanged.

What this does not fix

"Crawled – currently not indexed" is a quality/authority judgment, not a technical fault — there is no switch to flip. This removes the noise Google is currently wading through on the docs domain; it does not by itself get those 8 pages indexed. That comes from content depth, internal linking, and inbound links.

Summary by CodeRabbit

  • Documentation

    • Removed the standalone Markdown example page from the documentation site.
  • Bug Fixes

    • Excluded the search results page from the generated sitemap.
    • Updated site routing to allow documentation pages to load through their intended URLs.

…sitemap

The SPA catch-all rewrite in vercel.json sent every filesystem miss to
/index.html, so any nonexistent docs URL answered 200 with the homepage
instead of 404:

    $ curl -o /dev/null -w '%{http_code}' https://docs.opsimate.dev/this-page-does-not-exist-xyz123
    200

Google records those as soft 404s and spends crawl budget on them. The
rewrite was never needed -- Docusaurus emits a prerendered directory per
route and Vercel resolves clean URLs from the filesystem on its own,
which is why real pages have always served their own content while only
misses fell through. Removing it also lets the generated 404.html, which
the build still produces, actually be served.

Also excludes /search from the sitemap (an empty Algolia results page,
currently reported as "Crawled - currently not indexed") and deletes the
leftover `markdown-page` Docusaurus template, which was a public URL and
a sitemap entry with boilerplate content. Sitemap: 37 -> 35 URLs.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WaRCnbZLKMeMMYx4nsUgyS
@vercel

vercel Bot commented Aug 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
documentation-opsimate-docs2 Ready Ready Preview Aug 30, 2026 8:02pm

@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 484527a1-9f9b-4e14-b98c-56d3dcbd4838

📥 Commits

Reviewing files that changed from the base of the PR and between 8f43995 and d2187ae.

📒 Files selected for processing (3)
  • opsimate-docs/docusaurus.config.js
  • opsimate-docs/src/pages/markdown-page.md
  • opsimate-docs/vercel.json
💤 Files with no reviewable changes (2)
  • opsimate-docs/src/pages/markdown-page.md
  • opsimate-docs/vercel.json

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

Changes

Documentation site configuration

Layer / File(s) Summary
Sitemap exclusion
opsimate-docs/docusaurus.config.js
The classic preset excludes /search from the generated sitemap.
Vercel routing behavior
opsimate-docs/vercel.json
Vercel no longer rewrites all requests to /index.html.

Merge Risk: ⚪ Minimal · up to d2187

This change stops unknown URLs from serving the homepage and removes two unwanted sitemap entries; no actionable merge-blocking risk remains after normal checks and review.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@idanlodzki
idanlodzki merged commit 4a4566a into main Aug 30, 2026
6 checks passed
@idanlodzki
idanlodzki deleted the fix/seo-soft-404s-and-sitemap branch August 30, 2026 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant