Skip to content

Add www redirect and optimize meta descriptions#7

Merged
Mostafatalaat770 merged 2 commits into
mainfrom
claude/audit-bonuz-tech-website-WUkov
Mar 11, 2026
Merged

Add www redirect and optimize meta descriptions#7
Mostafatalaat770 merged 2 commits into
mainfrom
claude/audit-bonuz-tech-website-WUkov

Conversation

@bonuz-bot

Copy link
Copy Markdown
Contributor

Summary

This PR implements a canonical domain redirect and refines SEO meta descriptions across the application.

Key Changes

  • WWW Redirect: Added middleware to redirect all www. subdomain requests to the non-www canonical domain with a 301 permanent redirect
  • Meta Description Updates: Optimized meta descriptions in both English and German language dictionaries for improved clarity and SEO:
    • English: Shortened and simplified the description while maintaining key messaging about self-custodial wallets, digital identity, and blockchain infrastructure
    • German: Restructured the description for better readability and conciseness

Implementation Details

  • The www redirect is implemented in the middleware layer, ensuring it applies globally before any route processing
  • The redirect properly clears the port to avoid port duplication in the redirected URL
  • Meta description changes focus on removing redundant phrasing ("forge invisible technology that makes humans sovereign" → "for human sovereignty") while preserving the core value proposition

https://claude.ai/code/session_01JYvEvQLzzxbPgSif2Ly2fj

claude added 2 commits March 11, 2026 18:46
English (189→140 chars) and German (216→148 chars) meta descriptions
exceeded the recommended 25-160 character range flagged by Bing Webmaster
Tools. Shortened both while preserving key messaging.

https://claude.ai/code/session_01JYvEvQLzzxbPgSif2Ly2fj
Bing Webmaster Tools shows https://www.bonuz.tech/en as "Not discovered"
because the www subdomain isn't redirecting to the canonical non-www domain.
Added a 301 permanent redirect from www.bonuz.tech to bonuz.tech in the
Next.js middleware so search engines can properly discover and index the
locale pages.

https://claude.ai/code/session_01JYvEvQLzzxbPgSif2Ly2fj
@vercel

vercel Bot commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
bounz-tech Ready Ready Preview, Comment Mar 11, 2026 8:05pm

Request Review

@Mostafatalaat770 Mostafatalaat770 merged commit 17caba0 into main Mar 11, 2026
3 checks passed
@Mostafatalaat770 Mostafatalaat770 deleted the claude/audit-bonuz-tech-website-WUkov branch March 11, 2026 20:07
@claude

claude Bot commented Mar 11, 2026

Copy link
Copy Markdown

PR Review: Add www redirect and optimize meta descriptions

Overall this is a clean, focused PR with no major issues.

middleware.ts - WWW Redirect

The implementation is correct and follows the standard Next.js middleware pattern.

Minor: port clearing. Clearing url.port unconditionally is correct for production (avoids duplicating a port already embedded in the host header). Worth noting that testing www-redirect locally (e.g. www.localhost:3000) will redirect to localhost without a port, breaking the local dev flow. Minor DX nit only.

Consider HTTPS enforcement. The redirect preserves the original protocol, so http://www.example.com redirects to http://example.com (still HTTP). If HTTPS is already enforced at the infrastructure layer (Vercel domain settings, Cloudflare, load balancer) this is fine. If not, consider adding an HTTPS redirect here alongside the www redirect.

Ordering is correct. The www check fires before locale detection, so www visitors are redirected immediately without unnecessary locale processing.

lib/dictionaries - Meta Descriptions

Clean content edits. The shortened English description (~133 chars) fits within Google's recommended ~160-char limit, improving on the previous ~170-char version. No issues.

Summary

  • Logic correctness: OK
  • Security: OK (no user-controlled input reflected unsanitized)
  • Performance: OK (early return before locale processing)
  • Test coverage: N/A (middleware typically covered via integration/e2e tests)
  • SEO meta changes: OK

Action item: Confirm whether HTTPS redirect is handled at the infrastructure layer. If not, consider adding it alongside the www redirect in this middleware.

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.

3 participants