To block direct access to /wp-admin you will need to enable/check “Hide Admin” option in General Settings tab.
If it’s still the issue then please let us know your site’s wp-admin login details (as private reply) so that we can look into it. Thanks!
Thats my problem. I dont want to block my wp-admin to avoid issues to my other plugins. What I want is when I am not logged in to the site and when I type wp-admin, it should not redirect to the user to the secret url login page. How can it be a secret if your plugin unable to block this situation? Is there any way to detect that if user is not login and still want to access wp-admin, it should never redirect to the login page, right?
/wp-admin and /wp-login.php are inter-related, and wordpress redirects wp-admin to wp-login.php. I didn’t get, what’s the point of hiding only wp-login.php and not wp-admin. The users and bots will know that it’s WP login page if either /wp-login.php or /wp-admin is accessible. So, either hide both or none.