• Resolved rocketeer76

    (@rocketeer76)


    I’m using WordPress 4.4.2 and WooCommerce 2.5.1 with these plugins:

    Polylang 1.8.5
    Hyyan WooCommerce Polylang Integration 0.25
    Yoast SEO 3.1.2

    For SEO reasons I’d like to create two websites in Google Search Console:

    http://www.domain.com/en
    http://www.domain.com/de

    And point them to different geographic areas within the Google Search Console admin panel.

    Shall I submit the same XML sitemap generated from the XML Sitemap & Google News feeds plugin to both sites in Google Search Console?

    Does the XML Sitemap & Google News feeds plugin generate href-lang tags? I don’t see any in the screenshots.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi @rocketeer76 that’s in interesting scenario! I’ve not tested this before so we’ll have to figure this out.

    I suppose you have set up Polylang to show each language in the URL with /de/ and /en/ respectively for all posts?

    Right now, with Polylang and XML Sitemap & Google News feeds, all languages should end up in the same sitemaps. Please make sure that all your URLs are present and then indeed submit the same sitemap to both sites in Google Search Console.

    If all goes well, Google Search should only index the relevant language version URLs. Please keep an eye on how many URL’s are submitted (probably it will match the total of both languages) and how many are indexed. Hopefully, after a while, that number will end up (closely) matching the number of posts and pages in each respective language.

    Does the XML Sitemap & Google News feeds plugin generate href-lang tags? I don’t see any in the screenshots.

    Are you talking about the hreflang from https://support.google.com/webmasters/answer/189077?hl=en for example? These are not part of the sitemap but should be generated by Polylang. Visit your home page in /de/ for example in Google Chrome or Firefox and press Ctrl+U to see the page source code. Look for something like

    <link rel="alternate" href="http://example.com/en/" hreflang="en" />

    in the <head> section.

    Thread Starter rocketeer76

    (@rocketeer76)

    Hi,

    Yes I’ve set up Polylang to show each language in the URL for all posts and pages with /de/ and /en/

    I see that Polylang generates hreflang in the source code like this:

    <link rel=”alternate” href=”https://www.domain.com/en/&#8221; hreflang=”en-US” />
    <link rel=”alternate” href=”https://www.domain.com/de/&#8221; hreflang=”de-DE” />
    <link rel=”alternate” href=”https://www.domain.com/&#8221; hreflang=”x-default” />

    If these hreflang strings are already in the code perhaps I don’t need them in the sitemap. Although I would prefer to have them there too:
    https://support.google.com/webmasters/answer/2620865?hl=en&topic=2370587&ctx=topic

    In the document from Google you referred to they also say:
    “Sitemap. Instead of using markup, you can submit language version information in a Sitemap.”

    But again, that may cause problems if there is already markup in the source code.

    I’ll try to submit the XML sitemap to both sites in Google Search Console and see what happens 🙂

    If these hreflang strings are already in the code perhaps I don’t need them in the sitemap. Although I would prefer to have them there too:
    https://support.google.com/webmasters/answer/2620865?hl=en&topic=2370587&ctx=topic

    This feature is planned for a future version but I cannot say for sure when it will be implemented. Notably because there is no real hurry or need as it will always depend on the language plugin used (in your case Ploylang) and if the plugin does its work correctly, the hreflang alternates are already in the page source.

    Doing both (in page source and in sitemap) should not cause a problem, unless it’s not well implemented causing conflicting hreflang alternate links, of course. I’ll have to look into it and bother the Polylang dev again to ensure complete compatibility 😉

    For now, you’ll have to rely on the hreflang in page source.

    By the way, since you’re using Yoast SEO already, why not simply use the sitemap provided by that plugin?

    Thread Starter rocketeer76

    (@rocketeer76)

    I might use Yoast SEO for XML sitmaps. But the plugin creates a couple of them and they don’t work properly populating all URL’s as I expect.

    post-sitemap.xml
    page-sitemap.xml
    category-sitemap.xml
    product-sitemap.xml
    language-sitemap.xml

    Not sure how Google Search Console interprets language-sitemap.xml. But I guess I have to throw them all in and see what happens.

    I’m looking for a more solid and robust solution 🙂

    You should only need to submit the sitemap index. Google will be able to figure out the rest…

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

The topic ‘XML sitemaps in Google Search Console’ is closed to new replies.