How to Disable Image Attachment Pages in WordPress

In this article, I’m going to show you a simple way to disable Image attachment pages in WordPress. It’s quite easy to do however, we can’t disable image attachment pages but can redirect them to the parent post URLs. The WordPress SEO by Yoast is the best SEO plugin for redirecting the image attachment pages to the parent posts. Let me just show you the settings that needed to be configured in order to redirect image attachment pages to parent posts.

Disabling Image Attachment Pages using WordPress SEO by Yoast Plugin

Follow the steps below:

1. Go to SEO tab > Permalinks
2. Check box to redirect attachment URL’s to parent post URL

WordPress SEO by Yoast Permalinks

That’s it.

You can also redirect attachment pages by using a completely separate plugin.

Attachment Pages Redirect

Attachment Pages Redirect makes attachment pages redirects (301 permanent redirect) to post parent if any. If not, redirects (302 temporal redirect) to home page.

Related  How do I Edit the .htaccess file from WordPress Dashboard?

3 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *