redirect attachments to image file – sitemaps

#226494
  • Resolved Spiros Kalimeris
    Rank Math pro

    Hello
    First of all i followed the instructions here https://rankmath.com/kb/filters-hooks-api-developer/#how-to-add-code-snippets-to-rank-math-php and it broke my site at the point of creating rank-math-php file. Thankfully it was restored when i removed it.
    So first question is about this if there is a safe way to do this.

    Second i would like to ask about the sitemaps. I currently use jetpack sitemap which by default includes attachments pages in it and i obviously do not prefer that. I have made them no-index a couple of weeks ago with rank math but they are still on the jetpack sitemap. Should they still be there?

    Now i have added the redirection option to the original post that rank math offers, but this is not so ok because there are many orphan images on my site. Is it bad for seo to include attachments in it which redirect? Because doing an audit with ahrefs gives the “Noindex page in sitemap” error.

    Finally i am thinking of starting using rank math sitemaps and i would like you to guide me with a safe way to migrate. This is because removing attachments from the sitemap is included as an option to rank math. It will not affect the actual images correct?

    I wuld appreciate your feedback to all of the above which are kind of connected together.

    Thanks

Viewing 15 replies - 31 through 45 (of 50 total)
  • Dear people i start to believe the communication is problematic. All previouw replies state that the sitemap is working fine and now you tell me that it is not? How come?

    I already explained the problem. I did not say the sitemap is not working, i said it is not loading normally. It loads when i exclude the “https”part from the address bar. I have said it from the beginning and noone paid attention to it.

    And yes i have excluded it from the cache, i think i said that as well.

    Prabhat
    Rank Math agency

    Hello,

    You might be misunderstanding my reply. I meant that I’ve seen some issues in the sitemaps of your website. When I opened the sitemap, a blank page is displayed.

    Please see this screenshot for a quick reference:
    https://i.rankmath.com/iVvUnc

    This issue can either be caused if the sitemaps are getting cached or if some other plugin/theme is conflicting.

    If you’re not sure, then please extend the expiry of the login link so that we can fix all the issues that you’re facing.

    Looking forward to helping you.

    Thank you.

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Prabhat
    Rank Math agency

    Hello,

    We’re really sorry for the delay.

    I logged into your website’s admin area and upon inspecting, I found that the “Swift Performance” plugins are caching the sitemaps and causing the issue here.

    As I cleared the above plugins cache, the sitemaps appeared without any issues. I also tested the sitemaps in multiple web browsers like Google Chrome and Firefox.

    Please have a look at the screenshot in the sensitive data section of this ticket.

    Could you please clear the cache of the above plugins along with clearing your browser’s cache and see if the sitemaps load on your end too? Please also test this in Firefox.

    Looking forward to hearing back from you.

    Thank you.

    In my case i have cleared the swift performance cache but the problem persisted. Also how did you find that the sitemap was cached by swift performance?

    Prabhat
    Rank Math agency

    Hello,

    As I previously noticed a blank page getting displayed when opening your sitemaps, this is usually caused if the sitemaps are getting cached or some other plugin/theme is conflicting and causing the issue.

    As I cleared the cache of the “Swift Performance” plugin, the sitemaps loaded instantly.

    Could you confirm if after clearing the “Swift Performance” plugin’s cache, you also cleared the browser’s cache and then checked the sitemaps? You can also test by temporarily disabling that plugin.

    I tried to login into your website but the login link is expired.

    While I was logged into your website, I also noticed a message from Rank Math shown in the sitemap settings under your WordPress admin area > Rank Math > Sitemap Settings. The message is related to adding rewrite rules in the configuration file of the NGINX server if the sitemaps are not loading properly.

    Please add the code from the below guide in the Nginx config file and see if the issue is fixed: https://rankmath.com/kb/xml-sitemaps-nginx/

    You can also get in touch with your web host to add the code in the Nginx config file.

    Please let us know how that goes.

    We’re really looking forward to helping you.

    Thank you.

    Hello
    I did some experimenting. It seems that disabling the swift performance plugins DOES NOT fix the issue for me.

    The only stable finding is that in chrome there is no issue and the sitemaps are loading right away. The problem seems to exist in firefox.

    So, if this is the case, is it necessary to request the nginx change?

    Any other ideas?

    Ankit
    Rank Math business

    Hello,

    I checked the sitemap with the firefox browser, and it appears the sitemap is working fine. The issue you are facing in your firefox browser must be because of the local web browser cache. Please consider flushing/erasing the firefox browser and recheck the sitemap.

    Here is the screenshot of the working sitemap:
    https://i.rankmath.com/8D9wfc

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    Hello still waiting.

    Hello
    Well i have been clearing the firefox cache but this does not help. I do not know if flushing is something else, you may tell me if so.

    Anyway i would like to ask about another 2 issues.

    First it seems that the post-sitemaps contain 99 posts more than the number of posts on my website. I noticed that some of the post are repeated on post-sitemap1 and 2. Is this normal?

    Second i ‘ve been doing an audit in ahrefs and it gives the following 404 error.
    There is this bad url 404 page
    https://kalimeristherapist.com/%CF%87%CF%81%CE%AE%CF%83%CE%B9%CE%BC%CE%B1-%CE%B3%CE%BD%CF%89%CE%BC%CE%B9%CE%BA%CE%AC-quotes/

    and there is the normal page
    https://kalimeristherapist.com/%cf%87%cf%81%ce%ae%cf%83%ce%b9%ce%bc%ce%b1-%ce%b3%ce%bd%cf%89%ce%bc%ce%b9%ce%ba%ce%ac-quotes/

    As you can see the only difference is in the capital letters. But the bad url 404 page seems to be included in the sitemap and linked to many other normal urls.

    I would like you to help me remove this url from sitemap or the pages i am not sure exactly.

    Prabhat
    Rank Math agency

    Hello,

    Firstly, I tested your sitemaps on multiple web browsers including Firefox and it is loading without any issues. I also tried removing the HTTPS protocol section and it still loads properly.

    There are 2 post sitemaps on your website, one contains 301 URLs and another one contains 112 URLs. If you’ve not recently added these URLs/posts, then we might need to take a closer look at the sitemap settings. In this case, please extend the expiry of the login link so that we can check the issue further.

    The URL that you’ve shared is a category archive page and it is present under the category sitemap. Also, the URL that is included in the sitemap is the small case version and it works properly (doesn’t returns a 404 error).

    Please see the screencast in the sensitive data section of this ticket.

    Could you confirm if the Ahrefs audit states that the bad URL is present in the sitemaps?

    Looking forward to hearing back from you.

    Thank you.

    Yes i confirm that it is found in the sitemap by ahrefs.
    I extended it, so please remove it.

    I noticed that some of the post are repeated on post-sitemap1 and 2. This might be the explanation for the higher number of posts, but you should also check it out.

    Hello,

    The issue with the sitemaps on your website was due to cache and to make sure this doesn’t happen again we added the following filter:

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

    After applying this filter the number of posts on the first sitemap reduced quite significantly and most likely removed all the duplications that you were seeing.

    We also tested your sitemap with the Googlebot, which is really what matters here since this is the bot that needs to crawl that to index your website, and that bot is able to fetch the sitemap correctly, meaning that it can crawl it:
    Sitemap Googlebot

    Hope this helps clarify your doubts and solve your issue.

    Don’t hesitate to get in touch if you require any further assistance.

    Well i want to thank you for what you have done so far. The sitemaps not loading issue still remains unfortunately but just with firefox. So i accept it. The issue with the number of urls is fixed thank you.

    I know i have kept you quite busy, so i will ask just a final thing. Is there a way to remove the 404 url i showed you a few answers back from the sitemap?

    Hello,

    Could you please tell us exactly the link you are referring to? We tried to look for the orphan post you mentioned some posts ago but that is no longer in the sitemap.

    If you are talking about a different one, please tell us which one so we can check the situation.

    Looking forward to hearing back from 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 15 replies - 31 through 45 (of 50 total)

The ticket ‘redirect attachments to image file – sitemaps’ is closed to new replies.