Add Reverse Proxied URL to Sitemap

#1053180
  • Resolved Daniel Parsons
    Rank Math free

    Hi,

    I have a page at katpole.com/quiz which is not showing up on our sitemap. It is originally hosted on bubble.io (not wordpress) so it’s not a wordpress page. We put it as a subdirectory of our website via reverse proxy through cloudflare.

    What’s the best way to get it on our sitemap?

    -Daniel

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

    I apologize for the issue you are facing with your sitemap. Since the page at katpole.com/quiz is hosted on Bubble.io and is being served through a reverse proxy, it won’t automatically be included in the Rank Math sitemap, as Rank Math only generates sitemaps for content that is created within WordPress.

    To include this page in your sitemap, you can manually add it to your sitemap settings. Here’s how you can do that:

    1. Navigate to Rank Math SEO in your WordPress dashboard.
    2. Go to Sitemap Settings.
    3. Look for an option to add custom URLs or manually include URLs that should be part of the sitemap.

    If you do not see an option to add custom URLs directly, you may need to consider using a filter in your theme’s functions.php file to programmatically add the URL to the sitemap. Here’s a sample code snippet you could use:

       add_filter( 'rank_math/sitemap/extra_urls', function( $urls ) {
           $urls[] = 'https://support.rankmath.com';
           return $urls;
       });
    1. After adding this code, make sure to clear any caching plugins you might be using and regenerate your sitemap.

    For more advanced assistance or if you want to ensure everything is set up correctly, we recommend our professional setup service, which requires a PRO subscription. You can find more information about this service here.

    If you have any further questions or need additional help, please feel free to reply to this ticket, and a human agent from our support team will assist you further.

    Sources:
    Rank Math Sitemap Issues and Their Fixes » Rank Math

    How do I regenerate the sitemap after I’ve added the php code?

    Hello,

    You can follow these steps to flush your sitemap cache:
    https://i.rankmath.com/pipRDp

    However, here’s a filter you can use to fully customize the added URL to the sitemap:

    /**
     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://katpole.com/quiz</loc>
    <lastmod>2025-06-19T20:20:20+00:00</lastmod>
    </url>';
    });

    And here’s how you can add a filter/hook to your WordPress site:
    https://rankmath.com/kb/wordpress-hooks-actions-filters/

    In the code, you should change the page_content if you want it added to other post types, like post_content if you’re going to add it to post-sitemap.xml

    Looking forward to helping you.

    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.

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

The ticket ‘Add Reverse Proxied URL to Sitemap’ is closed to new replies.