Support » Plugin: Yoast SEO » Sitemap containing non existent URLs

  • Resolved spcinno

    (@spcinno)


    Hey there! Having problems with the sitemap that contains non existent URLs. I have a Testimonials section of my website which yoast has created Testimonial sitemap for. However in this sitemap are some “test” testimonials which do not exist anymore. They were deleted from the site and no longer around yet they are still in the sitemap for some reason.

    Because of the way the testimonials section on my website exists, when they were deleted they disappeared and did not go to trash so I cannot access the page and do a yoast seo setting to not include it in index.

    Is there a way to manually remove a URL from sitemap? I tried to edit robots.txt to include this:

    Noindex: /testimonial/test2/
    Noindex: /testimonial/test1/

    but it did not remove them from the sitemap. Any idea how to manually remove a specific url from the sitemap?

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • MariusG

    (@marius_codeinwp)

    Hi @spcinno,

    Normally, whenever you delete a URL (such as a custom post type for testimonials), it should also get removed from the sitemaps too. Are you using any caching plugins? If so, please make sure to clear your cache first.

    If the issue persists, please send us the URL of the sitemap where we can see these testimonials.

    We are looking forward to hearing from you.

    Thread Starter spcinno

    (@spcinno)

    Hey MariusG,

    Thank you for the reply! I do have a caching plugin but have cleared the cache and that did not resolve the issue.

    What’s weird is this issue in Search Console showed up Sept 7th but the sitemap is showing the page was last modified in Jan 2017. So strikes me as strange that this page shows up in the sitemap almost three years later.

    Is there any easy way for me to PM you the sitemap URL? prefer to not post URLs publicly.

    Plugin Support amboutwe

    (@amboutwe)

    The WordPress forums do not offer a way to privately provide the sitemap URL except when a topic is first created.

    That said, if you disable the sitemap feature and load the sitemap; you should receive a 404 Not Found page instead of the sitemap.

    After it loads a 404 Not Found while disabled, please enable the sitemap feature again. Does the non-existent URL still appear? If so, something in your setup has that URL.

    If that’s the case, please export all of your content. This will provide you with a text-like file that you can search. Once you find the URL in the export, is it in a permalink or canonical field?

    Permalink
    <link>http://example.com/hello-world/</link>

    Canonical

    <wp:meta_key><![CDATA[_yoast_wpseo_canonical]]></wp:meta_key>
    <wp:meta_value><![CDATA[http://example.com/something-else/]]></wp:meta_value>

    If the non-existent URL is in a permalink field, the content still exists somewhere. A few lines below the <link> field will be a permalink field with a ?p= followed by the post ID.

    If the non-existent URL is in the canonical field, a piece of content has a custom canonical set to the non-existent URL. Above the canonical field, you will find a permalink field as described above.

    If you edit any testimonial, you’ll notice the browser URL includes an ID which you can replace with the ID from the export file to locate the item that causes the non-existent URL to appear in the sitemap.

    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 containing non existent URLs’ is closed to new replies.