Nico
(@nicolamustone)
Automattic Happiness Engineer
Hello,
If I understand this right, you want the Cart, Checkout and My Account pages to be indexed.
If so, you can use this code in your (child) theme’s functions.php file:
remove_action( 'wp_head', 'wc_page_noindex' );
I would not recommend removing the noindex
from these pages though. There is really no reason for them to be indexed on Google. Nobody needs to reach those pages from Google as they would be empty or inaccessible anyway.
Thread Starter
boppar
(@boppar)
Hi.
No, I don’t want the Cart, Checkout and My Account pages to be indexed.
As mentioned I get errors in Google search console “Submitted URL Marked noindex”. The URLs are cart, checkout and my account.
I guess most Woocommerce users might get these errors. I want to know if there is a way to handle those errors without indexing those pages?
Nico
(@nicolamustone)
Automattic Happiness Engineer
Ah ok ok, I understand now. I will leave this to the Google experts in this forum then.
Plugin Support
con
(@conschneider)
Engineer
Hi there,
As mentioned I get errors in Google search console “Submitted URL Marked noindex”. The URLs are cart, checkout and my account.
This is on purpose. Cart and checkout are always empty for Google, so is my account, since it needs a login.
Setting this to no-index is intended and will not hurt your SEO.
If you want these entries to be gone you can modify your sitemap.xml
accordingly and submit it manually.
Kind regards,
Thread Starter
boppar
(@boppar)
The problem was with Yoast SEO which by default adds cart, checkout and my account to the sitemap.
Thread Starter
boppar
(@boppar)
The problem isn’t solved.
I thought the problem would be solved when manually setting “Allow search engines to show this Page in search results?” to “No” (in Yoast SEO).
It did remove the cart, checkout and my account from the XML sitemap. However Google Search Console continues to give the error “Submitted URL Marked noindex” on the cart, checkout and my account pages.
Isn’t that weird? If they are gone from the XML sitemap wouldn’t the problem be solved?
Nico
(@nicolamustone)
Automattic Happiness Engineer
Is the sitemap used on Google updated or does it still include the pages?
Thread Starter
boppar
(@boppar)
Google Search Console read the sitemap the last time the 15th of April. propably just before I updated the map.
Just to be sure I pinged Google today.
Nico
(@nicolamustone)
Automattic Happiness Engineer
Thread Starter
boppar
(@boppar)
Hi.
Not yet.
GSC read the updated sitemap yesterday, but the error is waiting to be verified. As soon as it’s done I’ll tell how it went.
Nico
(@nicolamustone)
Automattic Happiness Engineer
We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.
Thread Starter
boppar
(@boppar)
I just want to add that it worked.