Google Search Console Warning: Page with Redirect Error

#913835
Viewing 7 replies - 1 through 7 (of 7 total)
  • Hello,

    Thank you for contacting Rank Math and bringing your concern to our attention. I’m sorry for any inconvenience this issue may have caused you.

    You should run the URL inspection tool of your GSC account to inspect those URLs and check the referring page where they are coming from.

    Once you know their referring page, you can remove or update them so Google won’t discover those kinds of URLs.

    Also, those filtered URLs can still be crawled and end up with Alternate page with proper canonical tag status if they are set to index.

    You can use this filter to set them to noindex:

    add_filter( 'rank_math/frontend/robots', function( $robots ) {
    	$url = home_url( $_SERVER['REQUEST_URI'] );
    	if (strpos($url,'?attribute_') !== false || strpos($url,'?v=') || strpos($url,'?add_to_cart=') || strpos($url,'?filter_')) {
                    $robots['index'] = 'noindex';
                    $robots['follow'] = 'nofollow';
    	        return $robots;
            }
    	return $robots;
    });

    You may refer to this guide on how to add filters to your website:
    https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Once done, please clear your website’s cache and revalidate the issue in your Google Search Console account and give Google some time to recrawl your site.

    validate

    Here are the guides you can follow for these statuses:
    https://rankmath.com/kb/page-with-redirect/
    https://rankmath.com/kb/alternate-page-with-proper-canonical-tag/
    https://rankmath.com/kb/excluded-by-noindex-tag/

    Looking forward to helping you.

    I will try your suggested method, but it only resolves the “Alternate page with proper canonical tag” issue.
    However, for the “Page with redirect” problem, I still haven’t figured out a solution:
    https://imgur.com/V12iejR for URLs without the trailing “/”
    https://imgur.com/KHnOAmk for URLs with “/product/” removed from the product URL

    Hello,

    We noticed that the URL structure on your site is without the trailing slash / and the URLs with trailing slash, for instance, https://dioutdoor.vn/tui-ngu-du-lich-f150-naturehike-nh22msd05/ correctly redirect to the variant without trailing slash https://dioutdoor.vn/tui-ngu-du-lich-f150-naturehike-nh22msd05. This is rather informational rather than an error. Just ensure that internal links with the trailing slash are not used on your site so Google doesn’t crawl them.

    For the URL https://dioutdoor.vn/product/coc-giu-nhiet-da-ngoai-chong-nong-350ml was noticed it is being redirected by Rank Math, so a redirection rule must have been created for it. If you don’t desire this redirection please disable it from the redirection option in the plugin:
    https://imgur.com/t2nYJOU

    We hope this helps. Please let us know if you have further questions or concerns.

    Thank you.

    Thank you for your response.
    I will update this ticket in 14 days to see if I manage to resolve the issue.
    This might help others who encounter a similar problem.

    Hello,

    We might need to take a closer look at the settings. Please edit the first post on this ticket and include your WordPress & FTP logins in the designated Sensitive Data section.

    Please do take a complete backup of your website before sharing the information with us.

    Sensitive Data Section

    It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:

    https://wordpress.org/plugins/temporary-login-without-password/

    You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):

    https://wordpress.org/plugins/wp-security-audit-log/

    Looking forward to helping you.

    Thank you.

    After researching, I modified the following code to avoid double redirects:

    line: 112 wp-content/plugins/seo-by-rank-math/includes/modules/woocommerce/class-product-redirection.php

    return $new_link === $this->strip_ignored_parts( $url ) ? false : trailingslashit( home_url( strtolower( $new_link ) ) );
    to
    return $new_link === $this->strip_ignored_parts( $url ) ? false : rtrim( home_url( strtolower( $new_link ) ) );
    I replaced trailingslashit with rtrim to remove the trailing “/” from each URL, preventing two-step redirection.
    I hope this helps others as well.

    Hello,

    We appreciate you sharing the steps taken to resolve the issue.

    Please note that these changes will get overridden with each plugin update as they are not part of the source code of the plugin, so you would need to make a mental note to change the file with every plugin update.

    Don’t hesitate to get in touch if you have any other questions.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 7 replies - 1 through 7 (of 7 total)

The ticket ‘Google Search Console Warning: Page with Redirect Error’ is closed to new replies.