• Resolved raymond621

    (@raymond621)


    Hi Support

    How do I include my product attributes in my product sitemap. I have already enabled attribute archive to show in search result. But this only creates an archive for my attributes under sitemap. If I have a T-Shirt with multiple colors, how do I include the following into my product sitemap?

    abc.com/T-Shirt/?attribute_pa_color=Blue
    abc.com/T-Shirt/?attribute_pa_color=Orange
    abc.com/T-Shirt/?attribute_pa_color=Red

Viewing 6 replies - 1 through 6 (of 6 total)
  • @raymond621

    Yoast SEO would create a different sitemap for different product attributes you’ve and under each sitemap particular product attributes link will be listed.

    PA Sitemaps:

    abc.com/pa_color-sitemap.xml
    abc.com/pa_size-sitemap.xml

    You would need to perform the following steps:

    – In WordPress, go to SEO>Search Appearance
    – Click on the ‘Taxonomies’ tab
    – Scroll down until you see the corresponding product attribute (pa_colors, etc)
    – Set the product attribute’s setting of ” to ‘Show in search results’ to ‘Yes’
    – Click ‘Save Changes’

    Thread Starter raymond621

    (@raymond621)

    Yes I can see there are new attributes added onto the sitemap. But is it possible to include them in the products as following?

    abc.com/T-Shirt/?attribute_pa_color=Blue
    abc.com/T-Shirt/?attribute_pa_color=Orange
    abc.com/T-Shirt/?attribute_pa_color=Red

    I am running on a litespeed server and using litespeed cache. Litespeed cache cannot crawl these product links with query string. Therefore it couldn’t cache these links onto the server. I’m just trying to optimize my product pages.

    Plugin Support Michael Tiña

    (@mikes41720)

    Hi,

    The Yoast WooCommerce SEO plugin would actually filter out those attributes. So we wouldn’t recommend adding them individually onto the product sitemap, but if you would like to make any customizations to the default output, we have the following articles that may be of help – https://yoast.com/help/how-to-customize-the-sitemap-index/ & https://developer.yoast.com/features/xml-sitemaps/api/

    Thread Starter raymond621

    (@raymond621)

    The original method you mentioned creates an archive page for a list of product attributes. I don’t really need that as my shop doesn’t show a list of filtered attributes.

    I am reading the content from the link you have provided on the subject “Add additional/external XML sitemaps to the XML sitemap index”

    ————————————————————-

    function add_sitemap_custom_items( $sitemap_custom_items ) {
        $sitemap_custom_items .= '
    <sitemap>
    <loc>http://www.example.com/external-sitemap-1.xml</loc>
    <lastmod>2017-05-22T23:12:27+00:00</lastmod>
    </sitemap>';
        return $sitemap_custom_items;
    }
    add_filter( 'wpseo_sitemap_index', 'add_sitemap_custom_items' );

    ————————————————————-

    Do I add this to my theme function.php? How do I add custom URL into this external sitemap?

    Say I added this to the external sitemap: abc.com/T-Shirt/?attribute_pa_color=Orange, will this cause seo issues with google because it seems to be a duplicated content with abc.com/t-shirt/

    How do I exclude this external sitemap from google indexing or crawling it?

    I have a feed under google merchant center and it requires me to have an unique url for every product variable. So I added query string as parameters at the end of the product link for each individual product variant. I’m only adding these custom links onto the external sitemap for litespeed cache purposes. Litespeed cache can only crawl and make a cache copy on its server on items under a sitemap.

    Plugin Support Michael Tiña

    (@mikes41720)

    Hi,

    We do have an open feature request to have the ability to include links to the products with the product attributes in the sitemap.

    Thank you for suggesting a new feature for one of our plugins! You are actually not the first to have requested this feature! That means a feature request is already created and is currently under review by our product team.

    What’s next?
    Our product team will assess feature requests in relation to other open bug reports and new features. Based on their assessment, the feature request will be given a priority level. Our developers work on the highest priority first. Unfortunately, this means we cannot give you an estimate if or when they’ll start working on your request.

    If you have any further information that may affect the prioritization, please feel invited to reply to this email.

    We’re unable to provide specific advice on how to implement the sitemap filters for your use case. If you are unfamiliar with using it, we would recommend contacting your developer for further assistance.

    The concern here is if you add the URLs to the external sitemap (for the product URLs with the product attributes), Google might still flag duplicate URLs (but we do know that the canonical URL output would strip the filters here) and this might cause issues in the crawling and if Google would report any issues. We’re not sure how to exclude a particular sitemap from Google indexing or crawling it as the intention of including URLs in a sitemap is meant for the crawlers and bots to be able to locate those links on your website easily.

    We are going ahead and marking this issue as resolved due to inactivity. If you require any further assistance please create a new issue.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘sitemap include product attributes query string’ is closed to new replies.