Changing Robots.txt to Hide Login Page

#83806
  • Resolved IceHound
    Rank Math free

    If we changed the login URL of our site, what should we do to the robots.txt section of RankMath? I don’t want to change any other settings for fear of messing something up, but my URL for logging in is no longer the default wp-admin. What do I do?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    Thank you for getting in touch with us.

    If you truly want to hide it, you should not mention it in the robots.txt.

    Or, you could put a new robots.txt file in the folder you renamed wp-admin to and put something like this in it:

    User-Agent: *
    Disallow: /

    Please note not to put this in the root folder. Only put this in the robots.txt file of the folder that you do not want Google or other bots to crawl.

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    IceHound
    Rank Math free

    Can I put this in the robots.txt section of RankMath?

    Michael Davis
    Rank Math pro

    Hello,

    No. The robots.txt file in Rank math is the same as the one usually added to the root folder. As my colleague suggested, you should only add it to the robots.txt of the specific folder you do not want Google or other bots to crawl.

    Hope this helps you.

    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 3 replies - 1 through 3 (of 3 total)

The ticket ‘Changing Robots.txt to Hide Login Page’ is closed to new replies.