Have you ever actually checked how your website appears in SERPs? You might want to, especially if you are running WordPress. The reason is that when you upload an image and insert the normal way it creates a separate WordPress attachment page. And if you aren’t careful Google might actually start indexing these pages. You can see below in this picture that is what happened to me.
You can see above that “raventools” and “google-authorship” are actually the names of two image attachment pages. Example, below is what the raventools link goes to.
You can see that page is simply the attachment page that is created due to the image upload. Why is this a bad thing? It’s bad because in SERPs you have things showing up that are named wrong. Also, visitors are now hitting pages that are completely blank which may in turn lead to a higher bounce rate.
There are a couple of different ways to prevent Google from indexing your WordPress attachment pages.
Option 1 (preferred method)
The easiest way to fix this is to redirect the WordPress attachment pages to the original image itself. In this example I will show you how to do this using the Yoast SEO plugin. (there is also a similar setting in the All in One SEO plugin)
Note: Versions earlier than Yoast SEO 7.0 offered the option to redirect to a post or page. This method was removed from the plugin as it wasn’t reliable. I’m using the new option below (on all of my sites) to redirect to the image instead. It works well.
In your WordPress dashboard, click into “SEO → Search Appearance.”
Click on the “Media” tab. Then make sure the option to redirect attachment URLs is set to “Yes.”
Click “Save Changes.”
Remember it may take some time for Google to pick up the changes. I recommend waiting a week or two before checking SERPs again.
Another way to prevent this from happening is to click into the image attachment page and mark it as no-index within the Yoast plugin.
A third way to prevent this as Olaf mentioned below in the comments is that you could block all of your attachment pages from indexing within your robots.txt file. I prefer option 1 as it is quick and easy.
Now your SERP listings should look cleaner and your visitors won’t be hitting blank pages. As always feel free to leave your comments below!