Asked 7 years ago
9 May 2017
Views 5549
jaydeep

jaydeep posted

How to solve wordpress login page redirecting issue ?

google webmaster tool says some 300 crawl error .which is regarding to wp-login.php



it says

"Googlebot couldn't access the contents of this URL because the server had an internal error when trying to process the request. These errors tend to be with the server itself, not with the request. More info."

so i want to solve the login page redirecting issue , so it not redirect when it have

	https://example.com/wp-login.php?redirect_to=


https://example.com/wp-login.php give good result .
but https://example.com/wp-login.php?redirect_to show redirected status when feach as google .

so i think my solution relies in by stooping redirection wp-login.php when it have redirect_to in query string .
Mitul Dabhi

Mitul Dabhi
answered Nov 30 '-1 00:00

you can hide the wp-login.php from search engine . it s not necessary to crawl login page . so one can hide it from google .

change robot.txt file
add below line with other disallow command

disallow wp-login.php


it will say no to search engine to crawl wp-login.php

this can be temporary solution
disallow wp-login.php does not solve my problem - jaydeep  
May 10 '17 00:51
ravi

ravi
answered Nov 30 '-1 00:00

probably try to remove some plugin which causing issue.

because google fetcher clearly state that it have internal error.
which plugin i should remove ? - jaydeep  
May 10 '17 00:58
try to disable plugin one by one and see it solve the problem or not - ravi  
May 10 '17 00:58
jaydeep

jaydeep
answered Nov 30 '-1 00:00

i finally remove redirect link at all place by removing the redirect_to at first argument of wp_login_url

code was like this

wp_login_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) )


and changed it to


wp_login_url(  )

its not legitimate way but i need it solved
lets wait for some days if i get removed crawl errors

Post Answer