Search

    thegrindcalc.com: Astro, trailing slashes, and Search Console surprises

    Build notes from The Grind Calc — a coffee-to-water ratio calculator on Astro, plus the SEO footguns that showed up first.

    2 min read

    thegrindcalc.com (The Grind Calc) is a free coffee-to-water ratio calculator — grams, tablespoons, cups, fluid ounces, strength presets like 1:14 / 1:16 / 1:18, and the usual FAQ content that tools sites attract.

    Small site. Same SEO footguns as a big one. This is what showed up first.

    Why Astro

    The Grind Calc is mostly a calculator + explanatory content. Static HTML, almost no client JS, MDX when I need it. Astro fits that shape. Deploy on Vercel stays boring in the good way.

    Trailing slash canonicalization

    Astro and the host disagreed on whether / paths with and without a trailing slash were the same page. Search Console started reporting duplicates for thegrindcalc.com URLs.

    What worked:

    1. Pick one convention site-wide (trailing slashes).
    2. Set it in astro.config, then match it in host redirects.
    3. Emit <link rel="canonical"> on every page pointing at the chosen form.
    4. Make the sitemap URLs match that form exactly.
    // astro.config.mjs
    export default defineConfig({
      site: 'https://thegrindcalc.com',
      trailingSlash: 'always',
    });

    Canonical tags alone are a soft signal. If both variants still resolve, add a 308 redirect.

    Search Console findings that mattered

    • Duplicate without user-selected canonical — fixed by the slash policy above.
    • Crawled / not indexed on thinner utility-style pages — expected early; clearer titles and unique intros helped a few of them.
    • Soft 404 risk on empty or near-empty states — those URLs should noindex or redirect, not look like blank content pages.

    Checklist I reuse now

    • Unique title + description per page
    • Canonical URL
    • Sitemap + robots.txt
    • One trailing-slash policy, enforced
    • Open Graph tags for share cards
    • Fast LCP (static HTML helps a lot)

    The Grind Calc is live at thegrindcalc.com. Same Astro habits power this blog — fix URL normalization before you obsess over content length.

    Fawad Naeem

    Fawad Naeem

    Full-stack developer in Lahore building React Native apps, Astro sites, and AWS-backed products. This log is where the shipping notes live.

    View portfolio ↗

    Working on something?

    If you want help shipping a mobile or web product, email me — or see past work on the portfolio.

    Occasional shipping notes

    No spam — just new build logs when they ship. Form is ready; provider wiring comes later.