Home page html code that refers to a non-existent page

  • Hi, I’m Giuseppe,
    in the html code of the home page the plugini prints <link rel = “next” href = “https: //sitename/page/2” />. There is actually no page 2, 3, etc. on the home page.
    Maybe it can be useful to know that I imported the data from Yoast.
    Can you please solve this problem that creates seo problems?
    At the moment I managed the problem with 301 redirects but I would like to fix it well.
    Please tell me the changes you possibly make to the site to fix it so if it happens to me on other sites so that I can fix it myself.
    I’ll give you a temporary access link you can find it in the private area.

    Thanks for your help.
    Best regards
    Giuseppe

    P.S. I hope you understand … written with google translator

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

    Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.

    If you switch to the twenty twenty them you will note that your homepage does actually have a page 2 and page 3.

    However, I added the following filter in your active them functions.php that removes the rel=”next” and rel=”prev” from being handled by Rank math.

    
    /**
     * Allows developers to handle rel="next" / rel="prev" by themselves.
     *
     * @param bool $links_generated Whether or not to handle rel="next" / rel="prev" links.
     */
    add_filter( 'rank_math/frontend/disable_adjacent_rel_links', '__return_true' );
    

    Hope that helps. If you have any further question(s), please let us know. Thank you.

    Thanks for collaboration! One request: please, can you make the change in the child theme? I would like to avoid losing the change with the updates.
    Could you explain how to make the change? I have other sites with the same problem.
    Thanks for the assistance.

    Hello,

    To make the change, just add the filter code in my previous reply in your functions.php.

    In your current site, I added to the active theme, which I believe is the child theme.

    Hope that helps. If you have any further question(s), please let us know. Thank you.

    Thanks Michael you did a great job. I have also fixed other sites. Thank you very much for your assistance.
    Best regards,
    Giuseppe Rossetti

    Hello Giuseppe,

    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.

    Done. It was a pleasure!
    Thanks for the assistance.
    Best regards
    Giuseppe
    https://wordpress.org/support/topic/excellent-plugin-6151/

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

The ticket ‘Home page html code that refers to a non-existent page’ is closed to new replies.