• Resolved desariyanta

    (@desariyanta)


    We are using Yoast WordPress for SEO on all of our websites.

    One website in particular has a https://www.wijzonol.nl/verfblik-sitemap.xml in it. This sitemap shows the correct content when loaded via the browser. However, when being called via an API (for example via https://reqbin.com/), the content of the sitemap is completely different.

    How do we make sure that the content are consistent no matter where we load the sitemap from?

    Best regards,

    Desar

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Suwash

    (@suascat_wp)

    @desariyanta

    While I’m not familiar with the exact approach to retrieve the sitemap content via REST API, however, from a quick search I found a similar thread that might provide you some insight.

    Thread Starter desariyanta

    (@desariyanta)

    Hi Suwash,

    Thank you for your prompt response.

    I’ve checked out the thread and conclude that the OP and I are trying to solve a different issue.

    We’re trying to get consistent sitemap content no matter where we pull it from (browser or API).

    From the browser, we get the following result:

    URL	Images	Last Mod.
    https://www.wijzonol.nl/professioneel/producten	0	2021-12-07 12:50 +00:00
    https://www.wijzonol.nl/professioneel/producten/wijzopox-topcoat-aq	1	2021-11-22 08:33 +00:00
    https://www.wijzonol.nl/professioneel/producten/wijzonol-spray-okay-satin	1	2021-11-22 08:33 +00:00

    From the api we get this:

    <urlset xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xmlns:image="https://www.google.com/schemas/sitemap-image/1.1" xsi:schemaLocation="https://www.sitemaps.org/schemas/sitemap/0.9 https://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd https://www.google.com/schemas/sitemap-image/1.1 https://www.google.com/schemas/sitemap-image/1.1/sitemap-image.xsd" xmlns="https://www.sitemaps.org/schemas/sitemap/0.9">
    	<url>
    		<loc>https://www.wijzonol.nl//verf/ons-product-aanbod</loc>
    		<lastmod>2021-12-07T12:50:24+00:00</lastmod>
    	</url>
    	<url>
    		<loc>https://www.wijzonol.nl//verf/wijzopox-topcoat-aq</loc>
    		<lastmod>2021-11-22T08:33:36+00:00</lastmod>
    		<image:image>
    			<image:loc>https://www.wijzonol.nl/wp-content/uploads/2021/02/Wijzopox-Topcoat-AQ.jpg</image:loc>
    			<image:title><![CDATA[Wijzopox-Topcoat-AQ]]></image:title>
    		</image:image>
    	</url>
    	<url>
    		<loc>https://www.wijzonol.nl//verf/wijzonol-spray-okay-satin</loc>
    		<lastmod>2021-11-22T08:33:37+00:00</lastmod>
    		<image:image>
    			<image:loc>https://www.wijzonol.nl/wp-content/uploads/2021/02/Wijzonol-Spray-Okay-Satin.jpg</image:loc>
    			<image:title><![CDATA[Wijzonol-Spray-Okay-Satin]]></image:title>
    		</image:image>
    	</url>

    As you can see, when we pull from the api, the URL has //verf/ and without the /profesioneel/ in between.

    We’re wondering how can we ensure that we always get the result like the first one?

    Best regards,

    Desar

    Plugin Support Michael Ti?a

    (@mikes41720)

    Hi,

    When we’re trying to access https://www.wijzonol.nl/verfblik-sitemap.xml from the browser, we do see that it contains the //verf/ in the URL and without the /profesioneel/. Were you able to resolve this issue?

    Otherwise, this might be outside our scope of support as it is more on the technical side of things. You may want to look at our available developer documentation and APIs and see if this may be of help – https://developer.yoast.com/customization/apis/overview

    Plugin Support devnihil

    (@devnihil)

    We are going ahead and marking this issue as resolved due to inactivity. If you require any further assistance please create a new issue.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Sitemap content is different when called via Rest API’ is closed to new replies.