SEO Tips: Remember to redirect your attachment urls to your WordPress site
A lot of websites and blogs are running today on WordPress. WordPress itself is quite well optimized for SEO, but there are places where it still stops a bit afterwards.
One of the things is picture attachement urls for posts that, if you can not take care of them, can be disastrous for your side’s ability to pinpoint your keywords properly.
How does image url work in WordPress
When uploading images in WordPress, these images will be assigned to their own url as everyone, including Google, can access.
In practical terms, if you upload a picture directly to the media library called “image”, a page will be created with the dinside.dk/picture.
Uploading an image to a post will then be created a url https://www.tuthowto.com/media/image1, where the only thing that appears is the image you upload.
If you upload an image to a category, the scenario is the same as if you uploaded it directly to your media library.
Now let’s say you had a page with lots of text, the right meta title and more, all targeted keyword “picture”. Try to get into Google Place when they find that you have three URLs that all indicate that something here is “picture”:
The page you want to write to :
Attachment url page from picture in media library:
Attachment url page from image uploaded to post:
The pages will also get the titles “image 1” or the same name as the post it was created for. Therefore, in principle you now have 3 pages that try to hit the same keyword.
Google will be confused and as a result, will not rip some of the pages high – it does not work and therefore you need to close down for attachment urls and redirect them to their post
The solution to the problem is a plugin called Yoast SEO. Yoast SEO is an SEO plugin that can be a lot of things, but what you initially need to do is to enable redirect of attachment urls.
Install the plugin and go under advanced:
Then enter “Redirect attachment URLs two parent mail URL” and click “Redirect.”
Your image urls should now redirect to the posts they have been uploaded to.
But what about those who have not been uploaded to a post? (direct to media library or by category)