We are sorry to see that you are seeing a blank post sitemap on your site. Per your screenshot, you have a post on your site and that should appear in the post sitemap but it doesn’t.
Can you please confirm whether you have set the posts to noindex from the SEO → Search Appearance → Content Types (tab) or from the individual posts Yoast SEO meta box advanced option?
If you set no to the Show Posts in search results option from the Yoast SEO settings, it will exclude the relevant posts from the post sitemap.
Thank you Mazedul for prompt reply
These are my setting thru SEO → Search Appearance → Content Types (tab) :
https://i.imgur.com/w6QhhBG.png (post are not blocked for indexing)
Regarding the posts themselves, when you screen the page sources the meta box advanced option is set to generate meta robots with “index,follow”, this can be actually found in page sources (here below samples)
https://gjg.fr/actualites/alexandre-rochatte-a-visite-le-chantier-du-futur-chu/
https://gjg.fr/actualites/partenariat-entre-pole-emploi-et-le-groupe-jacques-gaddarkhan/
https://gjg.fr/actualites/jacques-gaddarkhan-une-tradition-dexcellence/
I saw one of the advice at https://yoast.com/help/my-sitemap-is-blank-what-s-wrong/ was “you may need to add rewrite rules (htaccess, NGINX) and then clear all your cache.”
Could you please advise what are the exact rewrites rules to add @ my HTaccess file?
Thank you for your precious advices
Alex
Hi,
If you have htaccess and are using Apache (if you are not sure, your host provider can help) then you will need to enter these rules into your server https://yoast.com/help/xml-sitemaps-apache/#add-rules.
When you add the rules please take the additional steps below:
1. Go to Settings-Permalinks and re-save them.
2. Clear all the caching from your theme, plugin, server, CDN like CloudFlare and browser. If you are not sure how to clear caching from theme/plugin please speak to those authors. If you want to clear cache from the server, please speak to your host provider. To clear the cache from a browser use this guide: https://yoast.com/help/how-to-clear-my-browsers-cache/.
Does the issue then resolve?
@iferganalex You don’t need rewrite rules because sitemaps aren’t broken. Sitemap index and page sitemap work correctly.
Possible issue is custom canonical URLs. It seems that you manually set canonical URLs for all posts ( If you unset canonical for particular post then you should see it into post sitemap ). Is it correct?
@ Pcosta88 @saša Thank you for your assistance:
Actually @saša is absolutely right: indeed when I test and remove the canonicals,the URL does show up @ post XML, this is what was confusing.
Many thanks for your advices and have both a great day
Alex