Two Rewrite Changes That 404'd Every Post on This Blog
An SEO audit of this blog turned up a list of small, unglamorous findings. /blog/ returned 404. Category archive URLs contained a literal /./ segment — /blog/./wordpress-performance — while tag archives were clean. Author archives 404'd for every author. None of these looked dangerous. They looked like an afternoon. That evening, every single post on the site 404'd. Twice. Two separate changes,…
An SEO audit revealed several small issues in the blog's permalink structure. The / / segment in category archives and the broken tag archives were the primary concerns. Despite appearing harmless, these issues led to two separate incidents where the entire blog went offline.
The first incident occurred when category archives started 404-ing. Subsequently, author archives and all posts followed suit. The second incident happened two hours later when all posts were again inaccessible.
Two changes were made to resolve the issues. The first involved altering the category_base setting from 'blog' to an empty value. This resolved the issue with category archives, allowing them to function properly. The second incident was addressed by implementing custom rewrite rules using the add_rewrite_rule() function.
Despite the temporary nature of the issues, the root cause of the problems remained unclear. The elimination of the custom category rule proved to be the effective solution.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.