0

Is there any safe way apart from the robots.txt to prevent the Magento admin url being indexed by Google.

1

There are three ways

The first way to use robots.txt in a safe way:

I didn't try it but it should work.

suppose you admin url is localhost.com/admin . Create a sub folder called secret, then a sub folder called admin.

the structure is /secret/admin. Put the robots.txt file inside secret and copy the index.php to admin folder.

Edit the path in index.php . Then change the admin url in magento to localhost.com/secret/admin . I prefer to change it from the local.xml not from the back-end.

The second way to use .htaccess file to stop bots. It will be something like that:

RewriteEngine On

RewriteCond %{HTTP_USER_AGENT} (googlebot|bingbot|Baiduspider) [NC]
RewriteRule ^admin/.* - [R=403,L]

Third way: to protect it with a password ( I prefer this way ). Because it is simple and will block the bots and users who does not know the password.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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