Engineering
The trailing slash that hid our blog from Google for four months
From December 2025 to April 2026, every post on our blog answered with a 404. Here's how one trailing slash caused it, why nobody noticed, and what we changed.
Hexer
Co-Founder & CEO
· 3 min read

For about four months, every post on this blog told Google it didn't exist. Not one was indexed, and links shared on WhatsApp showed no preview. The cause was a single trailing slash. Here's what happened, why it took so long to notice, and what we changed.
The setup
Our blog sat behind a small check: code that runs on our web host before a page is served. Its job was to send a proper "404 Not Found" for blog addresses that don't exist, instead of a normal-looking page with nothing on it, which search engines treat as a soft 404.
To know which posts exist, it read the site's sitemap, the file that lists every page for search engines, and checked the requested post against that list.
The change
On 14 December 2025, we made the site's addresses consistent by adding a trailing slash everywhere, so /blog/my-post became /blog/my-post/. That included the sitemap.
The check read each post from the sitemap with a pattern that took everything after /blog/. That now included the slash, so it stored my-post/. But the address it was checking had already had its slash removed, so it looked for my-post.
my-post and my-post/ aren't the same string, so it never matched. Every real post was answered with a 404 and a header telling search engines not to index it.
Why nobody noticed
Our website is a single-page app. When you click a link inside it, the browser swaps pages itself without asking the server. So anyone browsing the site, clicking from the blog page into a post, saw every post working perfectly.
The 404 only happened when a post's address was requested from the server directly: by Google's crawler, by WhatsApp fetching a link preview, or by someone opening a shared link. In other words, by everyone outside our own testing.
There was a second problem underneath. The copies of each post we pre-built for search engines came out with an empty body, so even a crawler that got through would have found nothing to read.
The fix
On 30 April 2026, we found it and fixed it by stripping the trailing slash from the slugs read from the sitemap, one line of code. The pre-built pages were fixed the same day.
What we changed so it can't happen quietly again
When we rebuilt the blog this year, we went further:
- The check fails open. If it can't read the sitemap, it lets the request through instead of answering 404. A broken check now shows a page instead of hiding it.
- The build fails loudly. If the build can't fetch the posts, it stops with an error, instead of quietly publishing a site with no posts.
- Pre-built pages carry the whole post. Each post's page is built with its title, summary, picture and full text, so a crawler reads exactly what a person sees.
The lessons
Test the way outsiders arrive. Clicking around your own site isn't the same as a fresh request from a crawler. When something matters for search or sharing, request the address directly and check the status code.
Make failures loud. The check failed quietly, by design, and the result looked like success to everyone on the team. Silent failures are the expensive kind.
Small consistency changes reach further than you think. Adding a trailing slash was the right call. What we missed was the one piece of code that compared addresses as plain text.
Google is slow to recheck pages it has seen as missing for a long time, so we're still catching up. But every post now answers the way it should.
From Hexerize
See what we're building.
Hexerize is a technology company from Ghana. Take a look at our apps, or get in touch.


