Have you noticed your WordPress website or blog creating separate URL for images?

It creates unnecessary pages which Google crawls it.

Example:

  1. Post: example.com/blog/my-blog-post/
  2. Image URL: example.com/blog/my-blog-post/blog-image/
  3. Image Path: example.com/blog/wp-content/uploads/date/blog-image.png

Generally, there is no use of 2nd URL, it just creates unnecessary pages. Ideally, this should redirect to the image itself.

Here is ho to fix this.

How to set up WordPress not to create separate pages for images?

Step1: Go to WP Admin Yoast Search Appearance

WP Admin >> Yoast >> Search Appearance

wordpress yoast search appearance

Step 2: Go to the Media Section

yoast search appearance media

Step 3:

Change Yes to “Redirect attachment URLs to the attachment itself”

yoast search appearance media yes

Leave a Reply

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