DEV Community

Cover image for The SEO launch checklist for a new website, with a prompt that runs it for you
Marc Mulvaney
Marc Mulvaney

Posted on Fully Autonomous

The SEO launch checklist for a new website, with a prompt that runs it for you

New sites rarely fail in search because of strategy. They fail because the staging noindex shipped to production, the canonicals point at the preview domain, or the sitemap lists URLs that redirect. And the checklist everyone followed had nothing you could actually run.

Below, a popular launch checklist becomes commands: checks on the build before launch, then on the live domain after. The examples use an Astro dist/ folder and https://www.example.com; swap in your own. At the end is a prompt that has a coding agent run the lot.

1. Check the build for leftover noindex and bad canonicals

After npm run build:

# Pages still carrying noindex
grep -rli 'noindex' dist --include='*.html'

# Pages with no canonical tag
grep -rL 'rel="canonical"' dist --include='*.html'

# Canonicals that don't point at production
grep -rhoE 'rel="canonical" href="[^"]+"' dist --include='*.html' \
  | grep -v 'href="https://www.example.com'
Enter fullscreen mode Exit fullscreen mode

All three should print nothing. The last pattern assumes rel comes before href, the usual order in layouts.

Then open dist/robots.txt. A Disallow: / left over from staging blocks the whole site. Add a Sitemap: line with the full URL.

2. Check titles, descriptions, H1s and alt text

# Duplicate titles
grep -rhoE '<title>[^<]*</title>' dist --include='*.html' | sort | uniq -d

# Pages with no meta description
grep -rL 'name="description"' dist --include='*.html'

# Pages without exactly one H1
find dist -name '*.html' | while read -r f; do
  n=$(grep -o '<h1' "$f" | wc -l)
  [ "$n" -ne 1 ] && echo "$n $f"
done

# <img> tags with no alt attribute at all
grep -rhoE '<img[^>]*>' dist --include='*.html' | grep -v 'alt='
Enter fullscreen mode Exit fullscreen mode

alt="" is correct for decorative images, so the last check only flags missing attributes. One H1 is a good convention, but Google has said several won't hurt, so treat those hits as review items.

3. Find broken links and orphan pages

npx linkinator ./dist --recurse serves the folder and follows every link. Each 404 is a broken link or a page that didn't build.

For orphans (pages nothing links to), crawl the local preview with Screaming Frog (free up to 500 URLs) with sitemap crawling on. It flags sitemap URLs it never reached through links and shows click depth. The original's "within 3 clicks" is a rule of thumb, not a Google rule.

4. Validate schema with the right tool

Pull the JSON-LD out of a page:

grep -oE '<script type="application/ld\+json">[^<]+' dist/index.html \
  | sed 's/^<script[^>]*>//'
Enter fullscreen mode Exit fullscreen mode

Paste it into the Schema Markup Validator, which checks any schema.org type, and the code tab of Google's Rich Results Test, which only reports types Google turns into rich results.

Valid markup doesn't guarantee a rich result. Since August 2023, Google shows FAQ rich results only for well-known government and health sites, so FAQPage on a dentist's site changes nothing in search.

5. Run Lighthouse CI on the build

// lighthouserc.js
module.exports = {
  ci: {
    collect: {
      staticDistDir: './dist',
      url: ['http://localhost/', 'http://localhost/contact/'],
    },
    assert: {
      assertions: {
        'categories:seo': ['error', { minScore: 0.9 }],
        'categories:performance': ['warn', { minScore: 0.9 }],
      },
    },
  },
};
Enter fullscreen mode Exit fullscreen mode

Run npx @lhci/cli autorun. Without a url list, Lighthouse CI audits only five auto-discovered pages, so list one per template.

Lighthouse emulates a phone by default. That's your "mobile usability" check now, since Search Console's Mobile Usability report and the Mobile-Friendly Test were retired in December 2023. Then tap through the menu, forms and phone links on a real phone.

6. After deploy: redirects and headers

On the live domain, every variant should reach the same URL in one hop:

for u in http://example.com http://www.example.com https://example.com https://www.example.com; do
  curl -sIL -o /dev/null \
    -w "$u -> %{url_effective} (%{http_code}, %{num_redirects} redirects)\n" "$u"
done
Enter fullscreen mode Exit fullscreen mode

You want 200 and at most one redirect each. Then check headers:

curl -sI https://www.example.com/ | grep -iE '^(HTTP|x-robots-tag)'
Enter fullscreen mode Exit fullscreen mode

An X-Robots-Tag: noindex header works like the meta tag, and grepping dist/ will never find it. Cloudflare Pages adds it to every preview deployment by default, so confirm production doesn't send it. Run the loop over any old site's URLs too.

If robots.txt blocks a URL, Google never sees its noindex, so protect staging with a password, not Disallow.

7. After deploy: every sitemap URL returns 200

curl -s https://www.example.com/sitemap-0.xml \
  | grep -oE '<loc>[^<]+</loc>' | sed -E 's#</?loc>##g' \
  | while read -r url; do
      code=$(curl -s -o /dev/null -w '%{http_code}' "$url")
      [ "$code" != "200" ] && echo "$code $url"
    done
Enter fullscreen mode Exit fullscreen mode

No output is a pass. The loop doesn't follow redirects on purpose: a sitemap should list only canonical URLs, so a 301 is a fail. Google ignores priority and changefreq, so skip them.

8. After deploy: Search Console and PageSpeed

URL Inspection only works on a verified property Google can reach, so "test key URLs in GSC" is a post-launch job for most staging setups. Add a Domain property through DNS, submit the sitemap, and run "Test live URL" on one page per template. Under "View tested page", check the rendered HTML has your main content and nav links.

The PageSpeed Insights API defaults to desktop, so set the strategy:

curl -s "https://www.googleapis.com/pagespeedonline/v5/runPagespeed?url=https://www.example.com/&strategy=MOBILE&category=PERFORMANCE&category=SEO" \
  | jq '.lighthouseResult.categories | map_values(.score)'
Enter fullscreen mode Exit fullscreen mode

A new site has no Core Web Vitals field data until enough Chrome users visit, so at launch you're reading lab numbers. The metrics are LCP, INP (which replaced FID in March 2024) and CLS.

9. Test conversions in GA4 DebugView

Open the live site through Tag Assistant or GTM preview, then GA4's Admin > Data display > DebugView. Submit a test form and tap the phone link. Each event should appear once, with the right name. Mark it as a key event (GA4's current name for conversions).

Events don't show in DebugView if consent mode is on and you haven't accepted analytics cookies. And a form that submits with GET puts the visitor's email in the URL, which GA4 collects in page_location. Use POST, and check event parameters for names, emails or phone numbers.

For two weeks after launch, watch the Pages report and Crawl stats in Search Console for 404s and 5xx errors.

The prompt

For Claude Code, Codex or Cursor in agent mode, from the project root after a build and deploy:

You are auditing a static website before and after launch. Run every check yourself with shell commands. Do not guess results and do not edit any files.

Build folder: [dist]
Production URL: [https://www.example.com]
Staging or preview host to flag: [project.pages.dev]
Sitemap URL: [https://www.example.com/sitemap-index.xml]
Key pages, one per template: [/, /services/example/, /contact/]
Old URLs that must redirect: [paste list, or "none"]

Part A, the build folder:
1. HTML files containing "noindex".
2. Missing rel="canonical", canonicals not starting with the production URL, and any link or canonical using the staging host.
3. robots.txt: any Disallow covering a key page, or no Sitemap line.
4. Duplicate or missing <title> and meta description, pages without exactly one <h1>, <img> with no alt attribute.
5. Run npx linkinator [dist] --recurse; list broken internal links and pages no other page links to.
6. JSON-LD on key pages: parses as JSON? Flag FAQPage and any self-written review markup.

Part B, the live site:
7. http, https, www and non-www each reach the production URL in at most one redirect.
8. X-Robots-Tag header on the homepage and key pages.
9. Every URL in the sitemap (and its child sitemaps), fetched without following redirects; list anything not 200.
10. Each old URL 301s to a relevant live page, not all to the homepage.
11. PageSpeed Insights API with strategy=MOBILE per key page: performance and SEO scores.

Output one table: check | part | result (PASS / FAIL / REVIEW) | evidence (file, URL or command output) | fix. After the table, list anything you could not check and why.
Enter fullscreen mode Exit fullscreen mode

Before trusting a PASS, run two of the commands yourself and compare. Any row whose evidence paraphrases instead of showing real output gets rerun.

Where to start

Short on time? Run the noindex grep on dist/, then the redirect loop and X-Robots-Tag check the moment the site is live. Those catch the mistakes that keep a whole site out of Google. Everything else fixes one page at a time.

Based on a post by Bint E Jamil (@seo_bint_ejamil) on X: https://x.com/seo_bint_ejamil/status/2108812272839864362, with corrections and extra steps.

Top comments (1)

Collapse
 
citedy profile image
Dmitry Sergeev •

We need to produce a short YouTube comment, one or two sentences, casual, start with lowercase. Must mention a specific reaction or question about this video. Then optionally mention the product with URL once. Must be helpful, not spammy. Must reference the product URL exactly once. Must avoid marketing buzzwords. Must not use em-dash, smart quotes, ellipsis char. Must not start with generic praise. Should be like "lol, the noindex thing saved me" etc. Include a question about the checklist. Then citedy.com