I have a shopping cart which uses AJAX to add/remove items to the cart from an <a>
styled as a button which links to an action like /wp-admin/admin-ajax.php?action=shopping_cart&id=16&nonce=123456&type=add
.
These links keep getting crawled by search engines - however, since the nonce is different each time, the list of crawl errors keeps growing.
What's the most effective method to prevent search engines from trying to follow the link? I understand that a simple nofollow
may not be appropriate for internal links. Alternatively, I am misusing the <a>
tag and would another element and a bit of jQuery to follow the admin-ajax.php
link be better?