Redirecting Image Attachment Pages To Parent Posts In WordPress

A new page is created by WordPress for each file attachment (like images, videos, audio, PDFs etc) you have on your WordPress site. The feature is good for some but not for all site site owners. Sometimes accidentally bloggers link images to attachment pages and then they don’t like the layout and look of the attachment page. Here we are discussing how you can easily disable the image attachment pages in your WordPress site.

WordPress SEO by Yoast plugin users can do this by visiting Dashboard -> SEO -> Permalinks page and then under the Permalink Settings section, tick ‘Redirect attachment URL’s to parent post URL.’ and save the new settings.

Alternatively, you can disable image attachment pages and redirect them to their parent post pages using another plugin called Attachment Pages Redirect. Simply install and activate the plugin. After activation the plugin automatically starts its work and if in-case no parent post is found the the attachment page is directed to home.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.