Benjamin Lu

everyday is cool

Permalinks That Survive a Redesign

The first time you change a site’s address structure, it’s tempting to judge the result by the new menu. An old link from somebody’s blog or feed is a better test. That link still points to the address you published originally.

Make a tiny URL inventory before changing a local test blog. Copy the addresses for two posts, an archive, and the feed. After changing the permalink settings, request each old address and record what happens. If an old address gives a 404 and you plan to keep the new structure, add a permanent redirect to the equivalent new page.

Use curl -I to inspect the status and the Location header. Then open the address in a browser and confirm that it reaches the intended article. The redirect is doing its job when a reader can follow the original link and still find what it promised.