Getting login pages redirecting to links on website and giving errors

#922512
  • Resolved Maynard Manyowa
    Rank Math free

    While doing a site audit I discovered that every post on my website now has a redirect that comes from my wp-login.php

    I have hundreds of links that have this link – https://derbynow.uk/wp-login.php?redirect_to=

    After the = sign it then redirects to the full link of the actual story.

    Clicking on this redirected link just sends me to the login page.

    Here is a screenshot of the error and how it shows.</a

    When I click it just takes me to the login page like so.

    The obvious challenge is that these are showing up in my SMERUSH reports and on Google and giving me hundreds of errors and warnings about site health.

    I can’t seem to find out where this is coming from. I can’t find the redirects in the Rank Math redirects.

    I have tried adding Disallow: /wp-login.php to the robots.txt file but that hasn’t worked. I am still getting hundreds of errors. And every published page or story now has a login page turning into a redirect for it.

    How do I fix this:

    Removing all these links or the source of them.

    Preventing this from happening again.

    Ensuring that crawlers don’t penalise me for this

Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for contacting us and bringing your concern to our attention.

    The pages you shared are usually created automatically when someone is reading the page after the redirect_to query string and tries to log in to the WordPress website. This makes sure that after logging in the person is redirected to the page they were previously on.

    Given that the pages are created automatically from WordPress we can’t do anything to prevent their generation but you can prevent Google from trying to crawl them by adding the following rule to your robots.txt file:

    Disallow: /*?redirect_to=*
    

    Please note that doing this will prevent Google from crawling them but the results on GSC are kept for historical reference.

    Hope that helps and please don’t hesitate to let us know 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 1 replies (of 1 total)

The ticket ‘Getting login pages redirecting to links on website and giving errors’ is closed to new replies.