Skip to content

fix(seo): set explicit site name and search-ready favicon#5

Merged
MattNotarangelo merged 1 commit into
mainfrom
worktree-seo-site-metadata
Jun 24, 2026
Merged

fix(seo): set explicit site name and search-ready favicon#5
MattNotarangelo merged 1 commit into
mainfrom
worktree-seo-site-metadata

Conversation

@MattNotarangelo

Copy link
Copy Markdown
Owner

Problem

The site's Google search result was rendering wrong (see below):

  • Site name showed "Cloudflare" instead of Cave Survey Viewer. The page gave Google no site-name signal (og:site_name, structured data, etc.), so it fell back to the shared pages.dev registered domain — which it associates with Cloudflare.
  • The icon was Google's generic globe, not our favicon. public/favicon.png is 1019×1095 — non-square and not a multiple of 48px, which fails Google's favicon-for-search requirements, so it gets rejected.

The title and meta description were already rendering correctly.

Changes

  • Add og:site_name, og:title, og:description, og:type, og:url, and a WebSite JSON-LD block so search engines label the result Cave Survey Viewer.
  • Add an application-name meta tag.
  • Add a 96×96 square favicon-96x96.png (centre-cropped from the source image), referenced with an explicit sizes hint; the original favicon.png stays as a fallback.

The JSON-LD is an application/ld+json data block (not executable JS), so the existing strict script-src 'self' CSP is unaffected.

Test plan

  • npm run build passes (tsc --noEmit && vite build).
  • Both favicon.png and favicon-96x96.png are emitted to dist/.
  • After merge + deploy, use Google Search Console → URL Inspection → Request Indexing to nudge a recrawl. Search-result changes can take days to weeks to reflect.

Note: site name is chosen at the domain level. On a shared *.pages.dev domain the og:site_name/structured-data signal is the documented lever but is weaker than on a custom domain.

🤖 Generated with Claude Code

Google search results showed the site name as "Cloudflare" and a generic
globe icon instead of the project's own. The page provided no site-name
signal, so Google fell back to the pages.dev registered domain, and the
1019x1095 non-square favicon failed Google's square/multiple-of-48 favicon
requirement.

- Add og:site_name, og:title/description/type/url and a WebSite JSON-LD
  block so search engines label the result "Cave Survey Viewer".
- Add application-name meta tag.
- Add a 96x96 square favicon-96x96.png (centre-cropped from the source) and
  reference it with an explicit sizes hint, keeping the original as fallback.

The JSON-LD is an application/ld+json data block, not executable script, so
the existing strict script-src CSP is unaffected.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying caveviewer with  Cloudflare Pages  Cloudflare Pages

Latest commit: 27af9d0
Status: ✅  Deploy successful!
Preview URL: https://09e074c2.caveviewer.pages.dev
Branch Preview URL: https://worktree-seo-site-metadata.caveviewer.pages.dev

View logs

@MattNotarangelo MattNotarangelo merged commit 7257808 into main Jun 24, 2026
2 checks passed
@MattNotarangelo MattNotarangelo deleted the worktree-seo-site-metadata branch June 24, 2026 22:53
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