0

I'm using an extension that allows only certain IP addresses to access my Magento admin. If someone tries to access my admin I get a message with the IP address.

Now I get messages that search engines crawlers try to access the URL of my admin page. First, they don't need to index those pages and second, I don't need to get a message every time a crawler tries to access these pages.

I know I can block access in my robot.txt, but then the URL of my admin page is public, while I just changed it to make it different from the default URL.

Is there another good way to block access to the admin URL completely?

1
  • never use robots.txt to block anything, use access rules per ip, if your address is dynamic, then you can use CIDR.
    – user2857
    Jun 10, 2015 at 15:20

1 Answer 1

1

Not all crawlers will actually honour the robots.txt file. However you can do Disallow /admin which instructs good bots not to look at that area.

Alternative and possibly better solutions would be:

Move your admin to a subdomain which is not easily guessable. Eg product-management-system.yourdomain.com

Finally, you could use .htaccess protection to require user authentication prior to reaching the magento code. This should prevent you getting the error message, and also make it slightly better protected against unauthorised access.

4
  • I guess you meant subdomain instead of subdirectory ;)
    – Dan
    Jun 10, 2015 at 7:48
  • Oops yeah thats correct updated :) Jun 10, 2015 at 7:53
  • I know I can add it to my robot.txt only then everyone can just open de txt file and see what the address of my admin area is, while I just changed the address because of safety reasons.
    – Lucky
    Jun 10, 2015 at 9:36
  • That is true, hence the using HTTP authorisation to further protect access to these resources. Jun 10, 2015 at 11:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.