Skip to content

Never let it invent a link

Claude will happily write a plausible internal URL that does not exist. Here is the check that stops it.

6 min read

Level 0

Curious

0 XP
150 XP to ApprenticeNo streak yet0 badges0% done

Ask for internal links and you will get internal links. They will look right. /blog/inventory-forecasting-guide is exactly what that page would be called, if it existed.

It does not exist. Nobody notices, because a 404 in the middle of a paragraph does not break the page, it just quietly costs you the reader who clicked it.

claude
>Add internal links to the draft.
Pulling the sitemap first. I do not place a link I have not confirmed.
WebFetch(site.com/sitemap.xml)
31 URLs. 12 under /blog/.
Bash(check 5 shortlisted URLs)
200 /blog/safety-stock-formula 200 /blog/reorder-points 200 /blog/demand-planning-basics 404 /blog/inventory-forecasting-guide 200 /features/forecasting
The 404 is the one that sounded most right. That is not a coincidence. Plausible is exactly what a guess is.
Dropping the 404 and taking the next best real page from the sitemap.

Three steps, in this order

Pull the sitemap. Shortlist the five most relevant real pages. Confirm each returns 200. Only then place them. Skipping straight to "pick five relevant pages" is how guessed slugs get in, because the model will fill the gap.

Re-pull it every session

Not once per client. Every session.

What went wrong2026-07-17

The sitemap that doubled mid-session

A client's first batch went live while the next batch was still being written. The sitemap went from 4 URLs to 8 in the middle of the working day. The second batch had been planned on the assumption that no real blog posts existed to link to. Four of them now did.

Cost: A batch nearly shipped with weaker internal linking than the site could actually support.

The rule that came out of it. Re-pull the sitemap every session. It is one fetch, and a site's sitemap changes exactly when you are least expecting it: right after you published something.

When there are not enough pages

New sites do not have five blog posts. That is fine, and it is not a reason to invent them.

  1. 1.Link every relevant post that genuinely exists.
  2. 2.Fill the rest from real category, directory, or landing pages in the sitemap.
  3. 3.Note the shortfall in the QA report, so it is a known state and not a silent miss.
  4. 4.Grow to five as the library builds.

Do this now

  1. 1

    Add the three-step rule to your CLAUDE.md, in this exact order.

    Internal links:
    1. Pull <sitemap URL> this session. Not from memory.
    2. Shortlist the 5 most relevant real pages.
    3. Confirm HTTP 200 on each before placing it.
    Never invent a slug. Report any shortfall instead of filling it.
  2. 2

    Run it against a draft you already published.

    > Check every internal link in this published article returns 200.

    Most people find at least one dead link on the first run. It is a cheap, slightly uncomfortable way to prove the rule matters.

Finished reading?

Mark it done to bank the XP and keep your streak alive. Any challenges on this page score separately, so you can come back for a perfect run later.