nofollow doesn't mean a link won't cause any SEO related issues.
nofollow means the link won't pass PageRank. However:
I no longer use
nofollow as a tool to manage any internal links.
nofollow is best suited for marking external links in user generated content and for marking paid links. Now Google suggests using
rel=sponsored for those, so I don't plan to use
nofollow ever again.
I would recommend preventing "add to cart" URLs from getting crawled by disallowing them in
If Googlebot can't crawl the URLs they are very unlikely to have much SEO impact. You would still "lose" PageRank that might have gone to those URLs, but in all the testing I've done that doesn't seem to matter. Discarded PageRank doesn't seem to hurt the rankings of other pages on your site.
Google might occasionally index an "add to cart" URL that it is disallowed from crawling. However, I think that is a risk worth taking. That usually only happens when the URL gets external links and when it happens it often only shows up in
site: search results on Google. If you don't disallow the "add to cart" URLs Googlebot has to crawl each one of them to see that (I think) they redirect back to the product page.
I also surveyed a couple WooCommerce shops from their example sites page. Many of the sites don't use links. It looks like it is possible to use forms with buttons:
<form class="cart" action="/product/buy" method="post" enctype="multipart/form-data">
<button type="submit" name="add-to-cart"
value="3061" class="single_add_to_cart_button button alt">
Add to cart</button>
This might be preferable to a "add to cart" link:
- Googlebot doesn't try to crawl
- It would eliminate any dropped PageRank.
- It would eliminate most of the risk of the "add to cart" URLs getting indexed despite being blocked by