Skip to content

SOLVED: Figure Out Why Some Pages Are Seen As Redirects

I recently added my site to Google search console. This tool give you insights into how Google indexes your site and if it sees any issues. After the migration from WP posts to Custom Post Type chapters (for future ACF integration), I setup a redirect for all the sites. But I took it down a short time later, mainly becuase Google barely had my site coming up anyway. Now they are complaining about my site having broken links with redirects. Not sure why…

Resolved: Sloppy links generation caused unnecessary redirects

Resolved on May 31, 2025

In order to debug this warning from Google that some of my pages were not being indexed because they were redirecting, I used the curl command. This command is pretty versatile—I had only known it as a tool to download files, like wget. But it turns out it also allows you to view HTTPS headers for a website.

Upon running this command, I noticed that, sure enough, my left navigation links on my main site were being redirected. This made no sense because the URLs were correct, and I had even disabled .htaccess redirect rules.

As it turned out, I was using URLs like /site-title-name when they should have been /site-title-name/.

See how the second one has a trailing forward slash? When I copied my URLs out of wp-cli and did a find-and-replace to add /chapter/ in front of each one, I accidentally removed that ending slash. Because the links still worked, I didn’t think it mattered.

But as it turns out, Google won’t even index those pages because of the redirect caused by the missing slash!

This feels like a WordPress design flaw. If those trailing slashes are important enough to affect site indexing by Google, then maybe WordPress should warn you—rather than silently redirecting them. Maybe those redirects are logged somewhere, but luckily Google emailed me and flagged the issue.

Published incompleted