Developer forum

Forum » Development » Sitemap manipulation

Sitemap manipulation

Lars Hejgaard Sørensen Dynamicweb Employee
Lars Hejgaard Sørensen
Reply

Hi :)

We have solution with three shops with different product ranges. Two of the shops are normal day-to-day delivery, but the third shop is for preordering items from future product collections. A new item can be a completely new product, but it can also be a new colour added to an existing variant master, which the dealers can place an order to receive the products when the now collection is released.

We can do some tricks to the index query and variant selector, so the future colours are not displayed on the regular shops, but if we include variants in the sitemap, all the colours will be listed here. So, is there a way extend the sitemap to take out individual variants, our should we build our own sitemap in this scenario? Qurious how others have solved similar issues.

The preorder shop is only accessible behind login, so we don't need a sitemap for this site.

Thanks :)

Br.
Lars


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply
This post has been marked as an answer

Hi Lars

If the product is published, it is published, and Google will pick it up the first time someone sees the product (e.g. if you are logged into Chrome or if you are using Analytics/GTM on the site) - leaving it out of sitemap.xml will have close to zero practical effect... Then we have the emotional effect of the product not being in the sitemap - you can take over the sitemap.xml simply by adding a page in the page tree with the URL name sitemap.xml and then that page will be served instead of the generated sitemap.xml file. But I would recommend not going down that path.

A page and a group can be left out of the sitemap using the "Show in sitemap" setting. We could consider doing the same for products eventhough I see no practical effect.

An other option is to not include variants in sitemap xml - they are usually what you would actually classify as duplicate content and variants use a canonical in the header to point to the master or default variant.

My recommendation would be to say to the customer that it is not worth changing the sitemap.xml - instead make a bit of logic to give visitors a 404 or a redirect to a valid variant if they happen to end up on the variant. If Google meets a 404 the product will also not be indexed.

Votes for this answer: 1
 
Lars Hejgaard Sørensen Dynamicweb Employee
Lars Hejgaard Sørensen
Reply

Hi Nicolai,

Thanks for the input. We will exclude variants form the sitemap and redirect to a valid variant, if someone ends up on an unavailable variant url :)

Br.
Lars

 

You must be logged in to post in the forum