Support » Plugin: WordPress SEO Plugin - Rank Math » Change X-Redirect-By header

  • Resolved Harry

    (@dibbyo456)


    Currently when I redirection is triggered by Rank Math’s redirections the X-Redirect-By: WordPress is added to the headers.

    Isn’t it should be X-Redirect-By: Rank Math?

    Because using the the term ‘WordPress’ is generic and we can not distinguish what caused the redirection.

    • This topic was modified 4 months, 2 weeks ago by  Harry.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Rank Math

    (@rankmath)

    Hello @dibbyo456

    Thank you for your valuable suggestion. It means a lot to us.

    This feature is unfortunately not available at this time.

    With that being said, there are existing feature requests, so I’ve added your vote to our internal suggestions lists. If your suggestions are something that we’re able to introduce, we’ll be sure to let you know.

    If you have any further question(s), please let us know.

    Plugin Author Rank Math

    (@rankmath)

    Hello @dibbyo456

    Upon checking further, it seems like we already have that in place (sorry for missing this out at the first place). Please check the following file:
    class-redirector.php

    You will notice this code:
    http://i.mythemeshop.com/rBJuIF

    Hope that helps. Thank you.

    Hi, thank you for the update. But unfortunately it’s not working.

    I have tried,

    add_filter( 'rank_math/redirection/add_redirect_header', '__return_true' );

    also tried,

    add_filter( 'redirection/add_redirect_header', '__return_true' );

    I’m still getting X-Redirect-By: WordPress

    Hello,

    The filter is not necessary – as true is its default value, you have to use the filter only if you want to disable the header.

    I have tested this and it is working correctly for me – Rank Math SEO is the value of the X-Redirect-By header. Are you sure the redirection you are looking at is handled by Rank Math and not another plugin?
    You can also try disabling other all plugins, to rule out possible plugin conflicts, and switch to a default theme like Twenty Nineteen to rule out a theme issue.

    Also, please make sure to use the latest version of both Rank Math SEO and WordPress core.

    Let us know how that helps.

    I have tested it multiple times. I’m still getting X-Redirect-By: WordPress and yes i’m using everything latest version. I’m using NGINX but I don’t think that’s an issue because the header is set by PHP not .htaccess

    Hello,

    That is rather unusual. Could you please head over to our support forums and open a new ticket about this? https://support.rankmath.com/

    Please include your site URL in the ticket, and the URL of a redirected page. Our moderators will assist you.

    Thank you.

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