0

I have an informational website running on WordPress, and I am using Yoast SEO for optimization. From the very beginning, the permalinks of all my posts have included a trailing slash: /category/%postname%/.

However, I've noticed that in Google Search Console, each of my posts appears with two URLs: one with the trailing slash (which returns a 200 status) and one without the trailing slash (which returns a 301 redirect). As a result, a significant number of my pages are marked as "Page with redirect" in the summary of indexed pages. enter image description here This has left me puzzled because:

  • All URLs in my sitemap include the trailing slash.
  • Each page has a canonical tag pointing to the version of the URL with the trailing slash.
  • I haven't found any internal links on my site that point to URLs without the trailing slash.

Despite the fact that most of my posts (with trailing slashes) are correctly indexed, their duplicates (without slashes) still appear in Search Console marked as "Page with redirect."

I am concerned that this might negatively affect my site’s indexing. With that in mind, I have two questions, but the information available online seems quite conflicting:

1. Should I remove the trailing slash from my permalinks?

On one hand, this could potentially solve the issue with the 301 redirects. On the other hand, it might create a new problem, as all currently indexed pages would then have a 301 redirect to the new URLs. I am worried this could negatively impact my (admittedly modest) traffic.

2. If it’s better not to change the permalinks, how can I fix this issue so that these "Page with redirect" entries no longer appear in Google Search Console?

Ideally, I’d like only the canonical URLs with the trailing slashes to be indexed.

Any advice or guidance on this matter would be greatly appreciated!

3 Answers 3

2

That bit of the report just says that the non-trailing-slash page exists on your site and that it returns a 301, and so Google are not indexing it for that reason (the section is headed "Why are these pages not indexing?").

Redirects listed here are not errors, just informational.

Search Console tells you what Google know about your site, and that view basically tells you every 301 it has discovered.

As to where it found them? Google could have found these before you added Yoast. If it has discovered the page at any point and it still exists, it will appear in Search Console.

You may be able to find more information by searching the redirect URL using the "URL Inspection" tool. If it's a referral, then that should let you know where it came from.

If you're sure that your internal link structure is correct (a site crawler such as Xenu could help you here), then I don't see it as an SEO issue. Even if you've linked some internal links without the slash, unless your site is huge, it's unlikely to cause any SEO problems.

1

At the very least, you can try adding this to your .htaccess:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*[^/])$ /$1/ [L,R=301]

Secondly, check for conflicts between plugins, in your case, that's Yoast.

Keep the current structure with the trailing slash because changing it will cause even more redirects and could hurt your traffic.

Hang in there, we’ll keep an eye on solving the issue!

0

Google is doing this because you have used both versions and both versions result in a valid response. The solution is

  1. Use only one version
  2. Use rewrite to change one to another. This can be done in htaccess, if thats an option
1
  • Thanks, I understand the second point, and I have added rules in the .htaccess file to force trailing slashes. However, I'm not quite sure what you mean by the first point. Where could I have used both versions? In my WordPress permalink settings, the trailing slash is enabled (and it always has been). All internal links also have the trailing slash, and the sitemap follows the same pattern.
    – Tot Samiy
    Commented Sep 9 at 1:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.