-
We have one main sitemap with 12 pages included which is indexed by Google. We have 1600 author pages which need to be indexed but when I build the sitemaps using RankMath they will not load.
-
Hello,
I apologize for the issue you are facing with your sitemap resulting in a 502 Bad Gateway error. This can often be related to server configuration or resource limitations. Here are a few steps you can take to troubleshoot and potentially resolve the issue:
-
Check Server Resources: Ensure that your hosting plan provides sufficient resources for your site. You can check this by navigating to Tools → Site Health → Info in your WordPress dashboard and comparing your server settings with the recommended values:
- PHP max input variables: 1000
- PHP time limit: 120
- PHP memory limit: 512M
- Max input time: 150
-
Flush Permalinks: Sometimes, simply flushing permalinks can resolve issues with sitemap loading. Go to Settings → Permalinks in your WordPress dashboard and click Save Changes without making any changes.
-
Check for Plugin Conflicts: Use the Health Check plugin to identify if there are any conflicts with other plugins that might be affecting the sitemap generation.
-
Server Configuration: If you are using Apache or Nginx, ensure that the appropriate rewrite rules are set up in your server configuration. For example, for Nginx, you would need to add:
# START Nginx Rewrites for Rank Math Sitemaps rewrite ^/sitemap_index.xml$ /index.php?sitemap=1 last; rewrite ^/([^/]+?)-sitemap([0-9]+)?.xml$ /index.php?sitemap=$1&sitemap_n=$2 last; rewrite ^/([a-z]+)?-sitemap.xsl$ /index.php?xsl=$1 last; # END Nginx Rewrites for Rank Math Sitemaps
If these steps do not resolve the issue, please reply to this ticket with your site URL so that a human agent from our support team can assist you further. Thank you for raising this concern, and we look forward to helping you get your sitemap working correctly!
Sources:
Rank Math Sitemap Issues and Their Fixes » Rank MathHello,
Thank you for contacting us and sorry for any inconvenience that might have been caused due to that.
5xx errors are usually caused due to server misconfiguration or other server issues.
Can you please share the website error log with us? Having the error log file will give a clear idea of why this might be happening.
You can follow this guide to enable debugging in WordPress https://wordpress.org/support/article/debugging-in-wordpress/ or you can get in touch with your web host, and they will help you locate the log file.
Looking forward to helping you.
Hello,
Thank you for getting back to me. I have installed a plugin to show the debug logs easily. You can see them here https://practition3stg.wpengine.com/wp-admin/admin.php?page=debug-log-viewer once logged in.
Please let me know if you need me to do anything else.
Hello,
These notices are not related to your sitemap.
The same notice is also showing on your sitemap, and that’s why it is not loading properly. However, you can also set the
WP_DEBUG_DISPLAY
constant to false in thewp-config.php
file.If the issue persists, we might need the FTP logins of your website for further troubleshooting.
If you’re not sure about your site’s FTP logins, you can get in touch with your hosting provider and then share the logins in the sensitive data section.
Looking forward to helping you.
Thank you.
Hello,
I have updated the sensitive data as requested. Can you please check further?
Thank you.
Hello,
Apologies for the delay replying, I have been having issues with the forum replies.
Please use the live url rather than staging for testing purposes now. I have added it to sensitive data along with FTP info.
I have also now set the WP_DEBUG_DISPLAY constant to false in the wp-config.php file on the live site.
Thank you very much for taking a further look.
Hello, is there any news on this issue please?
Hello,
We apologise for the delay in getting back to you.
We have shared this with our developers. We will get back to you once we have an update or solution from them.
Thank you so much for your patience while we resolve this for you.
Hello,
The use of
meta_query
in theget_users(..
function is overloading the DB and causing the issue: To fix this we’ve changed the code to a custom query on your site, by changing the contents of the fileincludes/modules/sitemap/providers/class-author.php
with the content on this gist https://gitlab.group.one/-/snippets/137This issue has also been logged, and a permanent fix will be included in an upcoming release.
We apologize for the inconveniences that might have been caused as a result of this issue.
Thank 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.
-
The ticket ‘Issue with sitemap going to 502 bad gateway page’ is closed to new replies.