• Resolved Rolf Allard van Hagen

    (@ravanh)


    Rank math seems to add a link tag <link rel="next" href=".../page/2/" /> (dots correspond to the site domain) to the front page head section but in some scenarios it is wrong and can lead to a 404 response or a duplicate page.

    I’ve noticed (so far) two scenarios:

    1. The site is using a FSE compatible theme and the front or archive page is using a (main) query loop block that is set to NOT inherit the models default query. In this case the link path should be something like /?query-X-page=2 because the /page/2/ will just show a duplicate of the first page.
    2. When Polylang is used and set to include the language string in request the path. In this case, the RankMath tag should look like /fr/page/2/ because the /page/2/ leads to a 404 response.

    Both sound bad for SEO to me… Please advise or fix ??

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Rolf Allard van Hagen

    (@ravanh)

    Scenario 1 (where /page/2/ is a duplicate) can be seen live on https://webzine.voyage/ and scenario 2 (where /page/2/ causes a 404) can be seen on https://ontherhone.com/fr/

    Plugin Support Rank Math Support

    (@rankmathsupport)

    Hello @ravanh,

    Thank you for contacting Rank Math support.

    1. The adjacent links are generated based on your site’s default pagination settings. The page will be considered paginated if the number of posts is more than the Posts Per Page you have set in the blog template settings. Our plugin will not consider the block’s pagination as it is the block that is being paginated, not the actual page. In that case, you can use the following filter to remove the adjacent links of our plugin as the canonical of the paginated pages will also show use the URL of the main page: https://rankmath.com/kb/filters-hooks-api-developer/#disable-adjacent-lins
    2. We have shared the guide to make Polylang compatible with our plugin on your other topic. Please use that and see if that resolves the issue.

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

    Thread Starter Rolf Allard van Hagen

    (@ravanh)

    Hi, it looks like the compatibility code from the other thread does indeed fix (at least) the next and canonical tags for Polylang, when the block theme template is using the default query loop, that is…

    Thanks ??

    Plugin Support Rank Math Support

    (@rankmathsupport)

    Hello @ravanh,

    We have replied to your other ticket regarding this compatibility sharing additional details.

    Please refer to that and if you have any other questions don’t hesitate to get in touch.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Wrong rel=”next” link tag’ is closed to new replies.