Uploaded image for project: 'Planet4'
  1. Planet4
  2. PLANET-7520

Redirect attachment pages to media url

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Should have Should have
    • None
    • 3
    • Media Library, SEO

      Summary

      To improve SEO rankings we should disable attachment pages that are currently being indexed by search engines.

      Relevant readings fromĀ Yoast and RankMath.

      We can't completely disable attachment pages, as those may have been linked in various places or social media. Instead we should redirect them to the actual media url. WordPress introduced an option on 6.4 to achieve exactly this behavior.

      Requirements

      • Set wp_attachment_pages_enabled value to 0. Ideally we can do that with a migration (or alternatively with a post deploy script.
      • Test and verify that the change is also applied on existing attachment pages.

            oagbernd Osong Agberndifor
            nroussos Nikos Roussos
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: