WooCommerce – Watch What You Expose to Google

It is common to add a Google Sitemap to your WooCommerce shop. There are many WordPress plugins that will provide this functionality for you. However, be careful you do not expose more than you bargained for, because it can have disastrous consequences on your SEO rating.

If your shop uses variations – variable products with different prices depending on different attributes that can be selected – then the variations will be stored in a post type called “product_variations”. You would not normally see this post type, as there are no links to the edit pages for them, and no public URLs for them, but they are there.

What can happen is that the sitemap plugin can pick up all these variations and generate URLs for them all, passing the full list of URLs to any search engine that asks. The trouble is, all those URLs are 404 pages, they are presented as “page not found”, and that makes your shop look half dead to Google and other search engines.

The fix is to ensure “product_variations” is excluded from the list of post types that the sitemap plugin generates. The settings for this will be in the administration pages for the plugin.

In summary: don’t tell the world about your WooCommerce product variations through your sitemap generated by your sitemap or SEO plugin. Direct access to the variations data is supposed to be kept well away from the front end of your site.


Just to add to this, I think variations should have a URL of their own. A variation URL could show the main product, but with the variation details pre-selected. This will enable you to bookmark variations (I was looking at a furniture store today to buy a sofa-bed, and wanted to bookmark a number of variations – style, colour, size – and couldn’t. Even though that store was not WooCommerce, it suffered from the same problem in that all variation selection is done in the front end using JavaScript and is not reflected in the URL at all).

Each variation page, even though a URL of its own, can still declare itself to Google to be a variation of the main product using a canonical URL element in the header. That should help SEO by showing search engines that you are not trying to spam them.

9 Responses to WooCommerce – Watch What You Expose to Google

  1. chris 2013-11-27 at 20:15 #

    Hey Jason,

    Thanks for the advice.

    My subdomain site is a standalone WordPress installation, but I plan to extend the domain and include other standalones and a multisite at the root.
    I somehow managed to declare only the root site with webmaster Tools; something I overlooked?
    Therefore I need to declare a sitemap for multiple sites (this one plus the ones to come); not sure how I’m going to do that down the road…
    How would you go about it?


    • Jason Judge 2013-11-28 at 10:56 #

      I’m not sure how you would do it in WordPress – possibly just hard-coded into the theme and a static file – but you can probably create a single static sitemap file that points to the master sitemap files of each site.

      So your main site that Google Webmaster knows about would have a single sitemap.xml, then that file can contain entries pointing to the master sitemap of each of the sub-domain sites.

      Is that the kind of thing you were looking to do?

  2. Ceci 2014-10-28 at 16:30 #

    Hi Jason,

    nice post..
    But how or where can i edit the own url for product variation?
    Do you know a wordpress plugin that allows you to edit an own URL to variations?


    • Jason Judge 2014-10-28 at 17:44 #

      I feel I may be misunderstanding what you are asking, but right now, there are no direct URLs to the front-end display of a product variation. It would be nice to be able to do that, and I have a few ideas as to how it could work.

      A quick search has turned up this plugin, which may do the job (I’ve not tried it):


      • Ceci 2014-10-29 at 11:40 #

        If i´ve a WordPress-Woocommerce shop that uses product variations and i create for each product color an own product-page/post with own url, e.g. shoe-black has the url (shop-dot-com/shoe-black), shoe-white (shop-dot-com/shoe-white), is there a possibility to set a link in shoe-black (shop-dot-com/shoe-black) to the other product variation with own url (shoe-white (shop-dot-com/shoe-white))?

        • Jason Judge 2014-10-29 at 11:58 #

          I have seen this done on import. When you import variable products via CSV, you can include attributes in the variations CSV data that are not related to the selection of a variation. The standard WooCommerce GUI does not show these attributes, and does not give you the GUI to modify them, but they are there on the variations. In your product display templates you can then access those attributes for display. It is a bit tricky though.

          Another way to get to the variations directly is by going to this page on your site:


          Be careful what you change in there, but you should be able to see and edit the variation posts there.

          • Ceci 2014-10-29 at 12:40 #

            ok, thank you! 🙂 i´ll try it…

  3. bebolino 2016-05-05 at 14:57 #

    Should I make a canonical URL on a shop page (WooCommerce Shop), based on the fact that internal pages 5, 6, 18 are ranked better than the root pages?

  4. James 2018-04-12 at 10:54 #

    Jason, thanks for advice! I want to mention that it is best to use 301 redirects, but if it is quite difficult or long to implement, then you can use the attribute rel = “canonical”. According to Google, we pass the weight through canonical links absolutely identical to the weight, which transfers 301 redirects. In my article – sitechecker.pro/canonical-url/ I also shown common mistakes with canonical. Hope it’ll help you in future!

Leave a Reply