Hello,
I apologize for the inconvenience you are facing with your sitemap. Thank you for bringing this to our attention.
To include the missing page URL in your Rank Math sitemap, you can follow these steps:
-
Check if Your Sitemap is Accessible: First, ensure that your sitemap is accessible by using a tool like httpstatus.io. Enter your sitemap URL (https://www.computerhope.com/issues/ch000746.htm?utm_campaign=RankMath) and check the status to identify any issues preventing Google from accessing your sitemap.
-
Exclude Sitemaps from Caching: If your sitemap is being cached, you need to exclude sitemaps from caching. You can refer to our tutorial on how to exclude sitemaps from caching for detailed instructions.
-
Submit Correct Sitemap to Google: If you have not submitted the correct sitemap to Google, make sure to submit sitemap_index.xml
and ensure that all the inner sitemaps, like post-sitemap.xml, are showing up in your Google Search Console when clicking on sitemap_index.xml
file.
If after following these steps the issue persists, please reply to this ticket, and a human agent from the Rank Math Support team will assist you further.
Thank you for your understanding and patience.
Best regards.
Sources:
Rank Math Sitemap Issues and Their Fixes » Rank Math
Why Did My Website Disappear From Google Search? » Rank Math
How to Fix Submitted URL Marked ‘NoIndex’ Error » Rank Math
Indexed, Not Submitted in Sitemap – Google Search Console » Rank Math
I checked my sitemap status using the toll you shared above. It is showing a 202 status code.
Pls, give me step-by-step instructions on how I can include the Calculator Page link inside the sitemap that your tool has generated.
Hello,
Thank you for your patience.
Since you mentioned that the page is not part of your WordPress site, then you may need to use the filter below to add it manually to your sitemap.
This filter will add it to your /page-sitemap.xml, but you can further edit it based on your needs:
/**
Filter to add extra URLs to the XML sitemap by type.
*
Only runs for the first page, not on all.
*
@param string $content String content to add, defaults to empty.
*/
add_action( 'rank_math/sitemap/page_content', function() {
return '<url>
<loc>https://www.pmaycalculator.com/pmay-subsidy-calculator/</loc>
<lastmod>2024-01-27 11:50 +00:00</lastmod>
</url>';
});
If you’re not sure how to add this code, you can follow this guide:
https://rankmath.com/kb/wordpress-hooks-actions-filters/
Once done, please follow the steps in this video screencast to flush your sitemap cache:
https://i.rankmath.com/pipRDp
Hope that helps.
I’m going ahead with the option-1. I’m using Code Snippets plugin to add a hook/filter.
What settings should I choose and what should be the priority?
Here are the settings available under Code Snippets plugin.
1) Run Snippet Everywhere
If you want this filter/hook to run all the pages (both front-end and back-end) of your website, choose Run Snippet Everywhere.
2) Only Run in Administration area
When you choose Only run in administration area, the filter/hook will run only in the WordPress admin area and will not run in the front-end of your website.
3) Only Run on Site front-End
If you wish to run this filter/hook only on your website’s front-end and not anywhere in the WordPress admin area, choose this option.
4) Only Run Once
If you wish to use your filter/hook to update a setting or activate a cron job or anything else that needs to be done only once, then choose this setting.
5) Priority
The default priority of this filter/hook will be 10. You can use the priority when you have multiple filters for a specific hook and need to prioritize which runs ahead/behind.
Waiting for your response
Hello,
Thank you for your patience.
You can choose the 1st option (Run Snippet everywhere) or at least the third option (Only Run on Site front-end) since the URL is not from your WordPress.
Regarding the priority, you should use the default (10) as it is only used when you’re adding multiple filters with the same function to prioritize their order.
Hope that helps.
Hello,
Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.
If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.
Thank you.