Archive page of cpt not showing in sitemap

#544121
  • Resolved Jacotaco
    Rank Math free

    First of all: Rank math is a fantastic tool. I’ve been using it on multiple websites over the years.

    For a new site we’ve created a cpt with a custom archive slug. To be clear: this is not a taxonomy of the herefore mentioned cpt, but the “root” archive page with all cpt posts listed on it (its not empty).

    I noticed this archive page url isn’t included in the sitemap. For now I’ve solved it by adding a page with the same slug as the archive slug, but that is a hacky solution if you’d ask me.

    Does someone know how to include the url of the archive page in a neat way in the sitemap?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello,

    Thank you for contacting the support and sorry for any inconvenience that might have been caused due to that.

    If that page is the default archive page of that custom post type, then it should be included in the sitemap as well. Could you please share the archive URL so we can check?

    Meanwhile, here’s the common reason why a URL is not included in the sitemap:
    https://rankmath.com/kb/url-not-in-sitemap/

    Alternatively, you can add a URL in your sitemap manually using this filter:
    https://rankmath.com/kb/filters-hooks-api-developer/

    Looking forward to helping you.

    Thank you.

    Hey Reinelle,

    Thank you for the reply. I kinda see what I’m doing “wrong”. I do not want to include the cpt singular posts in the sitemap, just the default archive page (it’s filled with post that don’t have a lot of content apart from some custom fields).

    So I’ve disabled the sitemap for that post type, which apparently means the default archive page is also excluded. I guess I wrongly assumed the default archive page would be included nonetheless. Correct me if I’m wrong :).

    I’ll go with adding the url manually via the filter I’ve fond on the page you provided. Thank you for that.

    Hello,

    You’re welcome.

    Glad that helped you with sorting the URLs in your sitemap.

    Could you please confirm if you still need assistance with anything else or we can close the ticket?

    Looking forward to helping you.

    Thank you.

    I’ve marked this as resolved now.

    Hello,

    We are super happy that this resolved your issue. If you have any other questions in the future, know that we are here to help you.

    If you don’t mind me asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post about your overall experience with Rank Math? We appreciate your time and patience.

    If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.

    Thank you.

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

The ticket ‘Archive page of cpt not showing in sitemap’ is closed to new replies.