• I have an issue with my WordPress website. There are around 32000 pages with redirect error on Google Search Console. The redirection is basically due to the automatic redirection of urls with non-trailing slash urls to trailing slash urls. I need to fix this redirect.

    Just for the information, the previous version of the url structure was without trailing slash, but after the website was moved to a new domain, the structure of urls was also changed to trailing slashes but now this gives errors on Google Search console, and this is the reason that too many pages on the website are not indexed. Need help to fix this auto redirection issue. Thanks in advance.

    • This topic was modified 3 months, 3 weeks ago by hassanjunaid.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator Hari Shanker R

    (@harishanker)

    Hi @hassanjunaid ??

    Sorry to hear about the troubles you are facing with the Google Search console. As far as I understand, the issue is that your updated site URLs have a trailing slash, whereas the URLs already indexed do not have the trailing slash.

    Off the top of my head, the easiest solution would be to restore this to the earlier URL structure (i.e. to remove the trailing slash). The easiest way to do this would be by visiting SettingsPermalinks in your WordPress dashboard, and by updatingthe permalink structure to a format that doesn’t include a trailing slash. For example: Set it to /%postname% (instead of /%postname%/). Click Save Changes to flush the rewrite rules and apply the new URL structure.

    Alternatively, you can use a Redirection plugin to set a role (set a redirection rule like so: Source URL: ^/(.*)/$Target URL: / /$1), OR use an SEO Plugin (such as Yoast SEO or Rank Math) to configure these rules. After implementing these steps, do test to see if the updated URLs come into effect.

    After making these changes, you might want to request a re-crawl of your site by using the URL Inspection tool of Google Search Console. You can do so by resubmitting your sitemap.

    I hope that helps!

    Thread Starter hassanjunaid

    (@hassanjunaid)

    Hi Hari,

    Thanks for your response, but I cannot revert the url structure for trailing slash to non-trailing slash as, more than 58K posts are indexed on this new url structure. WordPress is automatically redirecting the old urls to the new urls, so Redirection plugin, I think is not a solution. In fact, this is the problem, I want to resolve. Anyway, thanks again.

    • This reply was modified 3 months, 3 weeks ago by hassanjunaid.
    Moderator Hari Shanker R

    (@harishanker)

    Hi @hassanjunaid

    Thanks for the clarification, I think I have a better idea of the problem now. I think I misunderstood the issue earlier. So the core issue here is the redirection error of the 32000 pages in Google Search Console, after the site migration. However, you have over 58,000 pages with the new URL structure that have been indexed, so changing the URL structure is not a solution.

    I do have a question though. On the WordPress site, what change would you like to do to fix the issue? Please share what you would like to do, and I’m happy to investigate this further and propose a solution.

    By any chance, are there those 32000 old URLs without trailing slashes still present in the WordPress site, and would you like to fix that? OR, is everything working fine in the WordPress side (all pages are loading fine), and your issue is just fixing the 32000 URLs showing the redirect error in Google Webmaster Tools?

    Looking forward to hearing from you!

    Thread Starter hassanjunaid

    (@hassanjunaid)

    The url inspection report shows the page is not indexed. And about the sitemap it says, no referring sitemap detected. Also, no referring page is detected. This is the same for all the pages with Page with redirect error.

    Thread Starter hassanjunaid

    (@hassanjunaid)

    Check the screenshot for reference.

    • This reply was modified 3 months, 3 weeks ago by hassanjunaid.
    Moderator Hari Shanker R

    (@harishanker)

    Hi @hassanjunaid

    Thanks for clarifying the issue for us. This is really helpful. I’m happy to provide some guidance for you here.

    Before we proceed further, I want to state the Google Search Console is beyond the scope of the support we provide in the forums here. For further help, you might want to reach out to their support or ask directly in their forums.

    What I’m sharing below is essentially some basic guidance to resolve this issue, I hope this guides you in the right direction:

    1. Keep Trailing Slash URLs as Preferred
      Since trailing slash URLs are already indexed, retain these as your primary structure. Changing back to non-trailing slash URLs would create further complications as you said in your message.
    2. Remove Non-Trailing Slash URLs from Google Index
      Use the Removals tool in Google Search Console to de-prioritize non-trailing slash URLs. Go to Search Console → Removals → Temporary Removals, and submit the pattern for non-trailing slash URLs (e.g., https://example.com/*).
    3. Update the Sitemap
      You mentioned that there is no referring sitemap detected, you also said that there is no referring page detected. If you already have an SEO Plugin installed, please ensure that your sitemap includes only the trailing slash URLs. Regenerate the sitemap the SEO plugin, and resubmit it in Google Search Console under Sitemaps.
    4. Fix Internal Links
      Update internal links across your site to use trailing slash URLs for consistency. You can use a search and replace plugin to replace non-trailing slash links in your content.
    5. Verify Canonical Tags
      Ensure canonical tags point to the trailing slash URLs. Most SEO plugins handle this automatically, but you can verify by checking the source code of your pages.
    6. Let Redirects Work
      Keep the current 301 Permanent Redirects from non-trailing slash URLs to trailing slash URLs in place. Google will process them over time, cleaning up the errors.

    By focusing on indexing the trailing slash URLs and removing the non-trailing slash URLs from Google’s index, the issue will resolve without major structural changes, I think. You should be able to monitor the progress in Search Console. Keep using the URL Inspection Tool to request indexing for critical pages if needed.

    I know this is not the perfect solution, but I hope that this helps! Here’s hoping that the issue gets sorted out for good!

    Thread Starter hassanjunaid

    (@hassanjunaid)

    Thanks for your response and guidance once again.

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.