• Resolved alegenoa

    (@alegenoa)


    Hi guys, great plugin!

    Google sent me a message about hreflang return tags missing.
    On my English version blog, blumudus.com, the 2 problem pages are behaving as indicated in this thread:
    https://www.ads-software.com/support/topic/hreflang-on-paginated-blog-pages/

    But on my Italian version, blumudus.it, there are 14 problematic tags.

    In total they are highlighting 57 hreflang tags used, of which 16 are said to contain errors.

    On blumudus.it the pages with problems are: about, privacy, the 5 category pages, the paginated home pages and 4 blog articles.

    I can’t really say how come only 4 articles, and only those specific 4, are affected.
    If you exclude the exception of “page 2” and “page 3”, all the other pages affected are listed in the Google report with their correct counterpart, e.g.

    Origin URL: /2016/my-1st-twitter-block/
    Alternative URL: https://blumudus.it/2016/il-mio-primo-twitter-block-trump/

    Hence my confusion about what’s wrong there and how can I fix this with a comprehensive approach, also preventing future articles from being flagged.

    Thanks for your attention.

    Regards.
    Alessandro Grasso

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi there,

    I’m sorry, but I don’t follow.

    You have several reported hreflang tags due to paged pages, right? This can be solved with the code snippet in the other thread that you linked to.

    Then, you also have problems with, for example, the About page…? That’s no wonder, because the English page at https://blumudus.com/about/ lists for Italian the URL https://blumudus.it/chi-sono/. When you go to that URL, however, the English counterpart is said to be found at https://blumudus.it/bluemood/about/ (instead of https://blumudus.com/about/). So, why is this .it/bluemood/ instead of .com/? That’s another (sub-directory) site in your network, right?
    When I (try to) go there, I get redirected to https://blumudus.com/about/.

    Please have a look at your sites, and at the reported posts and pages, and their according translations. If everything looks okay, feel free to report back with a little more information. ??

    Thanks,
    Thorsten

    Thread Starter alegenoa

    (@alegenoa)

    Strange, I got email notifications for some other topics in this forum, but I missed this reply… I assumed you had no answer for it. Yesterday I just solved the problem, now I come here and… voilà! You were pointing me to it 3 weeks ago! Stupid me!

    Of course, the problem was that in the netw. admin settings the directory was still indicated, instead of the .com pointing to it!

    For some reason Google was testing only some of the pages, thus creating the false impression that only part of them had problems!

    Thanks anyway!

    Thread Starter alegenoa

    (@alegenoa)

    Ahem… I’m still here… I tried the solution proposed in the other topic https://www.ads-software.com/support/topic/hreflang-on-paginated-blog-pages/
    i.e.

    add_action( 'wp_loaded', function () {
    
    	if ( is_paged() ) {
    		add_filter( 'mlp_hreflang_html', '__return_empty_string' );
    		add_filter( 'mlp_hreflang_http_header', '__return_empty_string' );
    	}
    } );

    both with the “Code Snippets” plugin, and with a tentative inserting it directly in the functions.php, but the paginated pages still return the hreflang relative to the homepage.

    Am I the only one bothered by this? Google Webmaster tools seems to make a big deal of it.
    Anyway, I don’t understand how the code you suggested isn’t executed.

    Hi there,

    what exactly is not working (as you would like it to)?

    Are you visiting a paginated post/page/archive (on a page other than the first one) and you still see <link rel="alternate" hreflang="" /> tags in your markup?

    Are you using some sort of caching (e.g., a page cache)?

    Best regards,
    Thorsten

    Thread Starter alegenoa

    (@alegenoa)

    Hi,
    the problem is that Google insists I’ve got a bunch of hreflang errors: http headers without return tag.

    On page 2 of the home, it still points to the generic home page, even after putting that code to fix it, as I said.

    <link rel="alternate" hreflang="en-US" href="https://blumudus.com/">
    <link rel="alternate" hreflang="it-IT" href="https://blumudus.it/">

    I plan to cache pages in the future, not for now. I’m behind Cloudflare free, so that html is not cached (and the problem isn’t going away even after a few days).

    Additionally, for some reason Google indicates further errors. After I corrected the setting, substituting the directory path by putting the domain: https://blumudus.com/about/ in place of the old https://blumudus.it/bluemood/about/ , well, the tags are correct,

    <link rel="alternate" hreflang="it-IT" href="https://blumudus.it/category/scienza-tecnologia/">
    <link rel="alternate" hreflang="en-US" href="https://blumudus.com/category/science-tech/">

    but Google insists on reporting a hreflang error on blumudus.com, with this indication:
    /category/science-tech/ corresponds to
    https://blumudus.it/category/scienza-tecnologia/

    I don’t know what to say…
    Thanks for your patience!

    Any chance I could have a look at both your WordPress and your server (meaning either FTP or SSH, if you have that)?
    In case you want to provide any login credentials, you can do so via mail to: [email protected]

    I don’t know the Snippets plugin, but maybe it executes the code too late, so the wp_loaded has already been fired…?
    But if you also tried and put the exact same code into your theme’s functions.php file, this really should be working… :/

    Thread Starter alegenoa

    (@alegenoa)

    Problem solved!
    Many thanks, it seems that Google Search Console was just very slow in its assessing the effect of the corrections. They still marked a wrong tag 2 days ago, after a whole month…
    Anyway, I’ve also appreciated that the pagination issue was resolved with the latest plugin update.

    Thanks again!

    Oh, that’s great. ??

    You’re welcome.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Assorted hreflang errors’ is closed to new replies.