How can i remove pages from XML sitemap?

AustinLovvorn
Visitor
1 0 1

How can i remove pages from XML sitemap

Replies 9 (9)

staudinger
Tourist
7 0 0

I’ve been trying to figure this out as well. Anyone have suggestions or help?

Hasehm
Visitor
2 0 0

 there is two methode check it out https://community.shopify.com/c/Shopify-APIs-SDKs/How-can-I-remove-URLs-from-the-sitemap-and-NOINDEX...

however easy way will be adding this code below on pages that you wanna exclude from being indexed by google 

<meta name="robots" content="noindex">
John_Blue
Shopify Partner
2 0 0

Yes, adding below will suggest to Google to not index that URL. 

 

<meta name="robots" content="noindex">

 

But if that same URL is also listed in the sitemap.xml file then Google Search Console reports seeing two signals that are in conflict: The URL says NOINDEX and the sitemap.xml says to index. Google Search Console says there is an error "Submitted URL marked ‘noindex’".

 

Ideally, adding meta name="robots" content="noindex" to the page HTML and removing the URL from the sitemap.xml file will remove the error message from the Google Search Console.

squarepanda
Visitor
1 0 0

Removing url from sitemap.xml is not possible because it generating automatically while creating pages. So any solution to remove url from sitemap?

inspiregaurav
Visitor
1 0 0

I have Already Tried this method still i am facing issue in Search Console. Here are some of the URLs can anyone help me with this:

This is website URL: https://www.asp-usa.com/

Some Products URl: https://www.asp-usa.com/products/palm-defender-test-inserts-1

https://www.asp-usa.com/products/key-defender-test-inserts-1 , 

https://www.asp-usa.com/products/16-sidebreak-scabbard-1

inspiregaurav_0-1647423329117.png

 

Mimonz
Visitor
1 0 0

I added this code to the head and I got a problem in the loox section!

{% if handle contains 'page-handle-you-want-to-exclude' %}
<meta name="robots" content="noindex">
{% endif %}

 

although we have removed the code from the head, it has not been removed from the Loox section!

Please explain how to solve this problem?

Loox.PNG

David_OL
Shopify Partner
58 1 4

Hi there,

You can try our app: https://apps.shopify.com/sitemap-noindex-manager to achieve this.

Thanks 🙂

banned

KarimTarek
Shopify Partner
34 0 10

If you already have a metafields app you may follow those steps and that should do the trick. Good luck!

gnome_sayin
Tourist
11 0 1

You can add a metafield to the respective type (product/collection/blog/page)


Go to Settings > Metafields > [respective type] > Add definition

Name: Hide from XML Sitemap 

Namespace and key: seo.hidden

Content type: Integer

Hit Save

 

Go to the asset type you're interested in removing from Sitemap, scroll to bottom and you should see the metafield you just created.  Enter "1" to remove from sitemap.  "0" or leave empty to re-appear.  Leave out the quotes.

 

Note: This happened to me, if you encounter the namespace or key exist error but can't find it in the metafield defintion, use this url (be sure to use your store name) - https://[store name].myshopify.com/admin/metafields/product/migrate/seo/hidden