Most SEO problems that reach production are not content problems. They are a page quietly returning a redirect chain, a noindex left over from staging, a canonical pointing at the wrong host, or a sitemap that lists URLs which no longer exist.
You can catch almost all of these with curl and grep in a few minutes, before anyone opens an SEO tool. Here is the checklist we run on any page that is about to ship. Replace URL with the page you are checking.
URL="https://example.com/some-page/" 1. Does the page return 200, and how many hops does it take?
curl -sL -o /dev/null -w "%{http_code} %{num_redirects} %{url_effective}\n" "$URL" You want 200 0 and the same URL you asked for. If you see 200 2, the page works but goes through two redirects first. Every hop wastes crawl time and dilutes signals, so point internal links straight at the final URL.
To see the chain itself:
curl -sIL "$URL" | grep -iE "^HTTP|^location" A common chain on new sites is http://www. → https://www. → https:// (non-www). Fix it with one rule that sends every variant straight to the final host.
2. Is anything telling search engines not to index it?
There are two places a noindex can hide. The HTTP header:
curl -sI "$URL" | grep -i "x-robots-tag" And the HTML head:
curl -sL "$URL" | grep -ioE '<meta[^>]+name="robots"[^>]*>' No output from the first command and index, follow (or nothing) from the second is what you want. Staging sites often ship with a site-wide noindex setting that gets copied to production along with the database.
3. Does the canonical point to itself?
curl -sL "$URL" | grep -ioE '<link[^>]+rel="canonical"[^>]*>' For a normal page, the canonical should be the exact public URL: same protocol, same host, same trailing-slash style. Watch for canonicals pointing at a staging domain or at the homepage on every page.
There should be exactly one. Count them:
curl -sL "$URL" | grep -ioc 'rel="canonical"' Two canonicals usually means a theme and an SEO plugin are both printing one.
4. Is the page allowed in robots.txt?
curl -s "https://example.com/robots.txt" Read it, do not just glance at it. A Disallow: / under User-agent: * blocks the whole site. Also check that the Sitemap: line points at a URL that returns 200.
5. Is the page in the sitemap, and does the sitemap only list live URLs?
curl -s "https://example.com/sitemap.xml" | grep -c "<loc>" curl -s "https://example.com/sitemap.xml" | grep -o "<loc>[^<]*" | sed 's/<loc>//' | head If the site uses a sitemap index (common with WordPress SEO plugins), the first file lists child sitemaps; fetch one of those to see page URLs. Then spot-check a few of them with the status command from step 1. A sitemap full of redirects or 404s teaches search engines to trust it less.
6. Is the title tag there, and roughly the right length?
curl -sL "$URL" | grep -o "<title>[^<]*" | sed 's/<title>//' Check it exists, it is unique to this page and it is not the default site name. Very long titles get cut off in results, so aim for something people can read at a glance. Then check there is exactly one <h1>:
curl -sL "$URL" | grep -ioc "<h1" 7. Is structured data present and valid JSON?
curl -sL "$URL" | grep -c 'application/ld+json' If the page is meant to have schema (Article, Organization, Course, FAQPage), this should be at least 1. To check the JSON actually parses, pull the first block into jq:
curl -sL "$URL" \ | sed -n '/application\/ld+json/,/<\/script>/p' \ | sed '1d;$d' | head -c 5000 | jq . > /dev/null && echo "valid JSON" A missing comma in a hand-written JSON-LD block silently breaks the whole thing. Google's Rich Results Test will tell you whether the content is eligible; this just catches syntax errors early.
8. How fast is it for a real mobile user?
The PageSpeed Insights API works from the terminal too:
curl -s "https://www.googleapis.com/pagespeedonline/v5/runPagespeed?url=$URL&strategy=mobile" \ | jq '.loadingExperience.metrics | {LCP: .LARGEST_CONTENTFUL_PAINT_MS.percentile, INP: .INTERACTION_TO_NEXT_PAINT.percentile, CLS: .CUMULATIVE_LAYOUT_SHIFT_SCORE.percentile}' These are field numbers from real Chrome users, when Google has enough data for the URL. The "good" thresholds are an LCP of 2.5 seconds or less, an INP of 200 milliseconds or less and a CLS of 0.1 or less (the API reports CLS multiplied by 100). New pages often have no field data yet; in that case look at .lighthouseResult for lab numbers instead.
Put it in one script
#!/usr/bin/env bash URL="$1" echo "== status"; curl -sL -o /dev/null -w "%{http_code} hops=%{num_redirects} %{url_effective}\n" "$URL" echo "== x-robots"; curl -sI "$URL" | grep -i "x-robots-tag" || echo "none" HTML=$(curl -sL "$URL") echo "== meta robots"; echo "$HTML" | grep -ioE '<meta[^>]+name="robots"[^>]*>' || echo "none" echo "== canonical"; echo "$HTML" | grep -ioE '<link[^>]+rel="canonical"[^>]*>' echo "== title"; echo "$HTML" | grep -o "<title>[^<]*" | sed 's/<title>//' echo "== h1 count"; echo "$HTML" | grep -ioc "<h1" echo "== json-ld"; echo "$HTML" | grep -c 'application/ld+json' Save it as seo-check.sh, run bash seo-check.sh https://example.com/page/, and paste the output into the pull request. It takes seconds and it settles most "why isn't this page showing up?" conversations before they start.
Limits worth knowing
-
grepon HTML is a quick check, not a parser. Attributes in a different order (contentbeforename) can slip past these patterns, so treat "no output" as "look manually", not as proof. -
curlsees the server-rendered HTML. If your title, canonical or schema are injected by JavaScript, check the rendered page with URL Inspection in Google Search Console as well. - None of this replaces Search Console. It just means fewer surprises when you open it.
This article was created with the help of AI.

