I WANT TO FIX ERRORS RELATING TO URL “/feed/” and “locations.kml” in sitemap

#787892
  • Resolved Nhu Nguyen
    Rank Math free

    Please help me to fix this errors with google search console, I đon’t know how to set noindex for urls which have “/feed/” and how to delete locations.kml in sitemap.

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

    I apologize for the issues you are facing with the URLs “/feed/” and “locations.kml” in your sitemap. To address these errors in Google Search Console, you can follow the steps below:

    Fixing “/feed/” URL Issue:

    1. Set Noindex for URLs with “/feed/”:
      • Open the post/page in WordPress Editor.
      • Locate the Rank Math SEO Metabox.
      • In the Metabox, go to the Advanced Tab.
      • If the Advanced Tab is not visible, ensure you are in Advanced Mode.
      • Check if the Robots Meta is set to No Index for URLs containing “/feed/”.
      • Select the Index checkbox to change it to index.
      • Update the page to save the changes.

    Removing “locations.kml” from Sitemap:

    1. Delete “locations.kml” from Sitemap:
      • Access your sitemap settings in Rank Math.
      • Remove the reference to “locations.kml” from being included in the sitemap.
      • Save the changes to update your sitemap without “locations.kml”.

    If you encounter any difficulties or need further assistance, please feel free to reach out to our support team directly. We are here to help you with any additional questions or concerns.

    Thank you for bringing this matter to our attention.

    Sources:
    Troubleshooting the “Couldn’t Fetch” Error in Google Search Console » Rank Math
    How to Create a KML Sitemap Using Rank Math » Rank Math
    How to Fix Submitted URL Marked ‘NoIndex’ Error » Rank Math

    Nhu Nguyen
    Rank Math free

    Hi,
    For this step (Check if the Robots Meta is set to No Index for URLs containing “/feed/”), I only see index and noindex, but I don’t find where to enter “feed” to set noindex. I have sent the screenshot in the link above.

    Nhu Nguyen
    Rank Math free

    Here is the screenshot: https://imgur.com/a/yBYhdsP

    Hello,

    Feed URLs are not created for humans but for RSS feed crawlers and readers. They are only basic code versions of your actual content pages, and they are usually generated by WordPress as Rank Math features do not include feed generation on a site.

    However, you can add the following filter on the website to set the feed URLs to noindex:

    add_action( 'template_redirect', 'noindex_feeds' );
    function noindex_feeds() {
        if ( ! is_feed() ) {
            return;
        }
    header( 'X-Robots-Tag: noindex', true );

    If you’re not sure how to add this code, you can follow this guide:
    https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Hope that helps.

    Nhu Nguyen
    Rank Math free

    Hi,
    Where I should add this code in header or body?

    Hello,

    The filter should be applied to your theme’s or child theme’s functions.php file.

    Please follow our guide here on how to apply it aside from that method:
    https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Looking forward to helping you.

    The screenshot: https://imgur.com/a/B6ypcJJ

    I have chosen theme child and function.php to paste the code, but it notified that “Your PHP code changes were not applied due to an error on line 33 of file wp-content/themes/astra-child/functions.php. Please fix and try saving again.

    syntax error, unexpected end of file”

    So I cannot click update the file button, what should I do next?

    Hello,

    To help you investigate this issue further, we might need to take a closer look at your website and settings. Please follow these steps:

    • Edit the first post on this ticket and include your WordPress and FTP logins in the Sensitive Data section. This is a secure section that only our support staff can access.
      Sensitive Data Section
    • Make sure you take a complete backup of your website before sharing the information with us.
    • If you prefer, you can use this 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 also use this plugin to monitor what changes our staff might make on your website (if any): https://wordpress.org/plugins/wp-security-audit-log/

    We appreciate your cooperation and patience.

    Thank you for choosing Rank Math.

    Hello,

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

    Thank you.

    Hi,
    I have edited the first post and included the information of my website
    So please help me to fix this.
    Thank you a lot

    Hello,

    We apologize for the inconvenience. The code was missing a closing bracket (}).

    However, we included the bracket and added the code to your theme’s functions.php file.

    Hope that helps and please don’t hesitate to let us know if you have any other questions.
     
    Thank you.

    So now whenever I create a new post, the link which includes /feed/ of that post will noindex on google search console, is it right?

    Hello,

    Yes, the feed URLs of your posts will be set to noindex.

    Looking forward to helping you.

    Thank you for supporting

    Hello,

    We are super happy that this resolved your issue. If you have any other questions in the future, know that we are here to help you.

    If you don’t mind me asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post about your overall experience with Rank Math? We appreciate your time and patience.

    If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.

    Thank you.

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

The ticket ‘I WANT TO FIX ERRORS RELATING TO URL “/feed/” and “locations.kml” in sitemap’ is closed to new replies.