Redirected page available in the sitemap

#522035
  • Resolved Sonja
    Rank Math free

    Hello, my client’s site uses WPML plugin because the site has two languages. I detected that the sitemap includes one redirected URL instead of a valid one, as a home page for a language in a subfolder. Example:

    example.com is one language
    example.com/en/ is a home page of another language, which is a canonical version indexed in Google.
    However, example.com/en/home/ is present in the sitemap, although the URL is not live and has been redirected to example.com/en/

    What could be the issue here, and how to remove the example.com/en/home/ from the sitemap, and instead of that URL, include example.com/en/, which is currently missing from the sitemap?

    Thank you

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

    Thanks for contacting us, and sorry for any inconvenience that might have been caused due to that.

    Redirected pages should automatically be removed from your sitemap. Since it’s not updating, please try following the steps below to see if that works for you.

    1. Flush the Sitemap cache by following this video screencast:
    https://i.rankmath.com/pipRDp

    2. Exclude the Sitemap files of the Rank Math plugin in your caching plugin. The cache could be via a plugin or from the server. For plugins or Cloudflare, please follow this article:
    https://rankmath.com/kb/exclude-sitemaps-from-caching/

    3. If the above steps doesn’t seem to work, kindly apply the following filter code to your site.

    add_filter( 'rank_math/sitemap/enable_caching', '__return_false');
    

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

    If the issue persists, you may try excluding pages/posts form sitemap by following the URL below:
    https://rankmath.com/kb/configure-sitemaps/#exclude-posts

    Let us know how it goes. Looking forward to helping you.

    Thank you.

    Sonja
    Rank Math free

    Hello, thank you for your reply, but this didn’t help.

    The only thing that actually removed my example.com/en/home/ page was by excluding the page by the post ID, however, it didn’t add the canonical version of the page example.com/en/ to the sitemap. I guess they have the same post ID, although example.com/en/home/ redirects to example.com/en/.

    Hello,

    Could you please install the WPML SEO glue plugin as well (if not yet)? It’s available on your WPML Downloads page:
    https://wpml.org/compatibility/2021/04/wpml-seo-plugin-better-integration-with-seo-plugins/

    Once done, clear your website and sitemap cache and check again.

    If the issue still persists, we might need to take a closer look at the settings. Please edit the first post on this ticket and include your WordPress & FTP logins in the designated Sensitive Data section.

    Please do take a complete backup of your website before sharing the information with us.

    Sensitive Data Section

    It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:

    https://wordpress.org/plugins/temporary-login-without-password/

    You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):

    https://wordpress.org/plugins/wp-security-audit-log/

    We really look forward to helping you.

    Thank you.

    Sonja
    Rank Math free

    Thank you, I will try to see with the client if he can give me access to this plugin, or to download it myself. Please don’t close this ticket yet.

    Hello,

    Sure, let us know how this goes.

    Meanwhile, please don’t hesitate to contact us anytime if you have other questions to assist you further.

    Looking forward to helping you.

    Thank you.

    Sonja
    Rank Math free

    Hello, the issue persisted even though we added the WPML SEO plugin and deleted the cache. Please find the temporary login info in the Sensitive data field. I installed the recommended plugin Temporary login without a password.

    Hello,

    This issue was caused by the post name for this page in the database which our plugin was not seeing as a variation of the homepage.

    After removing the post name and letting WordPress generate the new one our plugin can now detect the page correctly and it shows the English variation of the homepage correctly in the sitemap.

    Don’t hesitate to get in touch if you have any other questions.

    Sonja
    Rank Math free

    Yes, I can confirm the issue has been resolved. Thanks a lot.

    Hello,

    Glad that helped.

    Please feel free to reach out to us again in case you need any other assistance.

    We are here to help.

    Thank you.

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

The ticket ‘Redirected page available in the sitemap’ is closed to new replies.