0

I've got an online shop plugin (made on my own) which uses custom tables for storing data about products. For list of product and for product detail I created WordPress pages and used shortcode to display list of products and data for a particular product. I use rewrite rules to have SEO friendly URL e.g. /nas-obchodik/chalk-paint-graphite/ will make call to /detail-produktu/?NAME=chalk-paint-graphite. nas-obchodik and detail-produktu are both standard WordPress pages with shortcode. The problem is that Google has never indexed this product detail, even when I try fetch as google and add the result into the index. I found only one article that google index only content return by get_post() method. Is there any solution to add custom table data into google index?

I overrode the default rel_canonical() function and made canonical tag for each product page specific as Milo advised, e.g. <link rel='canonical' href='http://www.navidieku.sk/nas-obchodik/annie-sloan-sablona-antheia/' /> Then I tried fetch as google and add the page to the index but still can't see it in google search results.

Update 11.6.2015 I tried to use sitemap (XML Sitemap Generator), add few of this pages as an external content. However, google indexed all the pages except of these in the external content list. You can see the list of pages here: http://www.navidieku.sk/sitemap-externals.html Any help appreciated.

  • do all of your product pages have a canonical meta tag with the same value? – Milo May 19 '15 at 17:36
  • yes, there is canonical meta tag <link rel='canonical' href='navidieku.sk/detail-produktu' /> <link rel='shortlink' href='navidieku.sk/?p=4953' /> however, I'm not really familiar with this and this was added there by wordpress itself, I suppose. – wiliak May 20 '15 at 6:47
  • the canonical tag tells search engines which page to index for content that can appear under multiple URLs. if it is identical for all products, that's likely why none of those pages are indexed individually. see this question, which you could use as a starting point to generate your own custom canonical links for those pages. – Milo May 20 '15 at 16:34
  • Have you tried using custom post types and post meta rather than custom tables? – Tom J Nowell May 26 '15 at 17:51
  • I decided to use custom tables for this type of plugin as it is an online shop. I found it easier to create list of product, product variations in separate tables than trying to use custom posttype. I'm using custom postype in another plugin for displaying "easy" product portfolio and for sure, it is indexed by google OK. – wiliak May 26 '15 at 18:01
0

The problem was caused by canonical meta tag (thanks @Milo), as it had the same value for all of these pages. You have to avoid using the same value for canonical meta tag for pages with dynamic content. I changed it to be unique for every page. However it took google more than one month to get these pages indexed. Check this article as well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.