When building a CMS, you can't not give people a way to edit 'slugs'

A draft saved under a placeholder headline was stuck with that headline in its web address forever. Here's how we fixed it, and why it matters more than SEO.

PublishedNovember 16, 2026 at 9:01 PM
5 min read
When building a CMS, you can't not give people a way to edit 'slugs'

Story illustration.

Bradley Keoun/ChatGPT

The bug report came from a chatbot. Claude Desktop, working through our publishing connector, told me it couldn’t change a draft’s web address. It was right. Nothing could.

A slug is the last part of a web address, the words after the final slash. For a story headlined, “Fed holds rates steady,” the slug is something like fed-holds-rates-steady. Our system generated it once, from whatever headline was on the story the first time it was saved, and never touched it again.

That is fine if headlines never change. In a newsroom, they change constantly, especially as they go through the process of drafting and editing. A story starts as a placeholder. A source calls back. A number gets corrected. A Penn study of the New York Times found 14 percent of homepage articles got a new headline after publication, and that’s the visible headline. The address underneath usually stays put.

Readers notice. When the Washington Post softened its 2019 obituary of Abu Bakr al-Baghdadi from “terrorist-in-chief” to “austere religious scholar,” the web address kept saying terrorist-in-chief, and the Daily Beast pointed it out. In 2009 the Guardian pulled a story about a “Twitter tsar” appointment, and the error page’s address still announced the headline.

A wrong fact in a headline gets fixed in a minute. A wrong fact in the address can live there for years, in every link anyone shared.

The SEO myth

Publishers tend to treat the slug as a search-engine matter. Google’s John Mueller has said the words in a URL are “a very, very lightweight factor” for ranking. Where the slug matters is everywhere a human sees it – the link in a text message, the citation in a footnote, a screen reader announcing the address out loud. Tim Berners-Lee’s 1998 note on the subject still holds: A good address is one that does not change, because you can never know who has linked to it.

That is the tension. The slug has to be editable, and the old address has to keep working.

How the big platforms handle it

Before building anything, I asked Claude Code to invoke a brainstorming routine and survey how other platforms handle this, then adjust our plan to what it found. It came back with a report on eleven of them.

Medium locks the slug at publication; you can’t change it. Substack, Ghost, and Squarespace let you change it and warn you in the documentation that old links will break. WordPress has quietly done the right thing since version 2.1 in 2007: it remembers every old slug and redirects it forever. Shopify does the same with a checkbox that’s ticked by default.

Ghost had one idea worth borrowing. A draft’s slug follows the headline until the story is published or someone edits it by hand.

Design choices

We took the WordPress model, with three additions.

Drafts stay fluid. Retitle a draft and its address follows. Publish it, or type in a slug yourself, and it freezes. The placeholder problem disappears without anyone learning a new field.

Old addresses live forever. Rename a published story and the system records the old slug and sends visitors to the new one. No limit, no expiry.

Robots get special treatment. Our stories are sold to AI agents, and an agent holding a paid link to the old address must not hit a dead end mid-purchase. So the reader interface serves the story under the old slug rather than redirecting.

I read the design and told Claude Code it was pretty technical for me but seemed well reasoned. That was true. What I could judge was the behavior: A publisher should never have to think about this until the moment they need to.

What the review caught

The software build-out of the new slug feature ran as a chain of small tasks, each written by one Claude Code agent and checked by two others before the next began. One reviewer found a hole I would never have spotted. The paywall checked the address with its own lookup, which knew nothing about renamed stories, and on a miss it let the request through. A paid story, reached by its old address, would have been served free. That got fixed before a line of the new code reached our staging website.

It took about a day, from the first bug report to the new slugs running on our main website, with the field in the editor, the command-line tool and the chatbot connector.

The address under a headline looks like the least important thing on the page. Get it wrong once and it is the most permanent.

Postscript

This story got the treatment before it was published. Claude Code filed the draft through our chatbot connector, and the system did what it had always done: it built the address from the headline. The headline is 68 characters. Slugs are capped at 60. So the address came out as when-building-a-cms-you-can-t-not-give-people-a-way-to-edit, cut off mid-thought.

A week ago that would have been the address, period. Instead I picked a new one and Claude Code set it through the same connector, in one call. The reply came back with both the new slug and the one it replaced. Because I chose it by hand, it is now locked; retitling the draft won’t move it. And because the story was still a draft, no redirect was needed. Nobody had the old address yet.

Look up. It says this-slug-was-manually-edited-because-we-could.


HOW AI WAS USED IN THE PRODUCTION OF THIS PIECE: I got AI to write the first draft of this article, relying on the transcript of my coding session within Claude Code inside Visual Studio and a custom skill I developed to replicate my own writing style. Then I used Distro Publisher, our official MCP server, to file the story as a draft directly from Claude Code to my newslode. I then edited the draft in DistroVerse’s editing interface and checked all the facts before publishing.

Coding Journal