• Resolved Ahmed2340

    (@ahmed2340)


    I changed the domain from positiver-dialog.at to selbst-st?rkung.at. Because of the mutated vowel (?) -> the yoast sitemap has entries like this https://www.xn--selbst-strkung-eib.at/blog etc…
    The generated sitemap cannot be read from google webmaster tools. i got an error that the structure is damaged.
    Has anybody an idea?
    Thanks
    ahmed

Viewing 8 replies - 1 through 8 (of 8 total)
  • Sa?a

    (@stodorovic)

    It seems that’s an issue related to lines added by “cache”:

    <!-- Cache-Datei-URL:                  https://...--....at/ -->
    <!-- Cache-Datei-Pfad:                 /cache/comet-cache/.../page-sitemap-xml.html -->
    

    Could you try to disable cache comments or deactivate comet cache and check again ?

    Thread Starter Ahmed2340

    (@ahmed2340)

    Hi
    wow, thanks for this hint. I will try so. One question – what have you done that you can see this added lines from the cache?
    When i view the source-code i didnt’t see this lines.
    thanks
    ahmed

    Sa?a

    (@stodorovic)

    I’ve seen it when I view source-code in Firefox (and I’ve confirmed it with cURL). I think that you check source (while you are logged in WP) when request isn’t cached (and comet comments aren’t added). You should open private window (incognito mode) and check source of sitemap.

    I see that you have changed plugin. Did you need more assistance or you abandoned Yoast?

    Thread Starter Ahmed2340

    (@ahmed2340)

    Hi Sasa,
    I diasabled yoast sitemap because there i a second error. If everything works i will enabel it again.
    In the head i have
    <?xml version=”1.0″ encoding=”UTF-8″?><?xml-stylesheet type=”text/xsl” href=”//www.xn–selbst-strkung-eib.at/wp-content/plugins/wordpress-seo/css/main-sitemap.xsl”?>

    When i want to validate i got an error – see
    href=”//www.xn--selbst-strkung-eib.at/wp-content/plugins/wordpress-seo/css/main-sitemap.xs

    It must be
    href=”https://www.xn--selbst-strkung-eib.at/wp-content/plugins/wordpress-seo/css/main-sitemap.xs

    Do yo have an idea how i can force yoast to generate it correctly?
    best ahmed
    Thanks again for the hint with the hidden comment. In Chrome i haven’T seen it as it was visible in Firefox.

    • This reply was modified 6 years, 1 month ago by Ahmed2340.
    Sa?a

    (@stodorovic)

    Stylesheet file isn’t needed for search engines (browsers use it to show nice output). Protocol relative URL (which begins with //) is valid URL, but it’s possible that some validators don’t recognize it as valid (some old browsers don’t accept it – maybe it’s reason).

    Anyway, you could overwrite it via filter wpseo_stylesheet_url (parameter is entire “stylesheet tag” – not only URL). I’ve created simple PHP snippet which you can use:

    add_filter( 'wpseo_stylesheet_url', function( $stylesheet ) {
    	$proto = is_ssl() ? 'https:' : 'http:';
    
    	return preg_replace( '#(//[a-zA-Z0-9-.]+/)#', $proto . '$1', $stylesheet, 1 );
    } );
    
    Thread Starter Ahmed2340

    (@ahmed2340)

    Hi Sasa,
    Thanks for the filter. So i add your Filter in the functions.php from my child theme. Is there anything else to do from my side?
    best ahmed

    Sa?a

    (@stodorovic)

    Yes, you need to add the code in functions.php and purge comet cache (if it’s activated). It’s possible that you need to purge OPcache (depends on hosting and PHP version). I’ve tested the code and it worked on my test server.

    Closed. No further questions.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Domain change – yoast generated sitemap cannot be read from google’ is closed to new replies.