In doing an SEO audit of our site, we noticed that the First and Next pager links both have 'rel="prev"'.. This can cause SEO problems since crawlers find two different URLs marked as prev.

Solution is to change the pager.html.twig template to use rel='first' or alternatively remove the rel for first and last since these values are not defined for the rel= attribute.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

cgmonroe created an issue. See original summary.

cgmonroe’s picture

Version: 8.x-4.x-dev » 8.x-3.x-dev

Corrected version to 8.3-dev branch.

phrabovcin’s picture

I changed rel attribute on "First" link to "first" instead of "prev" in pager.html.twig template.

phrabovcin’s picture

Status: Active » Needs review

Status: Needs review » Needs work
markhalliwell’s picture

Title: SEO problem: Pager template uses Prev for First and Next links » Pager uses rel="prev" on the first link
Status: Needs work » Reviewed & tested by the community

  • markcarver committed 326d619 on 8.x-3.x authored by pedro_sv
    Issue #2966175 by pedro_sv, cgmonroe: Pager uses rel="prev" on the first...
markhalliwell’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.