Have you noticed that whenever you upload a file to the WordPress media library, for example, an image, WordPress creates a separate media attachment page for each one of these files? The newly created media attachment page only contains media content along with its own automatically generated URL.
Such pages are not beneficial because they send a message to search engines that the page has thin content. For this reason, they have to be redirected from WordPress attachment pages to the page where the file is attached to.
For example, you create a post that includes three images. WordPress will create four URLs for these images – three for the images and one for the original post. This can affect your SEO in the following ways.
You can resolve this issue by redirecting the attachment to the post or page they belong to. It can be done via WordPress plugins or through your own code snippets.
In Yoast SEO, click on SEO option and
Once you do this, all the WordPress media attachment pages will be redirected to the parent post or page.
Remember, this will work only if the media was initially attached to a post or page.
On March 6th 2018, Yoast rolled out an update where a bug affected the rankings of some websites. In case you experienced a ranking drop after March 6th your website may be affected by the Yoast SEO bug.
Here is the official description of the bug problem.
‘The bug was simple yet very painful: when you updated from an earlier version of Yoast SEO to Yoast SEO 7.0-7.0.2 (specifically those versions), we would not always correctly convert the setting you had for the old setting into the new one. We accidentally set the setting to ‘no’. Because we overwrote the old settings during the update, we could not revert this bug later on.’
The founder of the Yoast, Joost De Valk added,
This post serves both as a warning and an apology. We want to ask all of you to check whether your settings for the redirect of the attachment URLs are correct. And, for those of you who suffered from a decrease in rankings because of incorrect settings, we offer a solution that Google has OKed as well.
We recommend you to go through the official announcement by Yoast to apply the suggested solutions if you were affected by the bug
In case you’re using ‘All in One SEO Pack’ not to worry. Here is the solution. Go to ‘general settings’ and check the box ‘Redirect Attachments to Post Parent.’
It is also possible to redirect WordPress attachment pages to the original post using only code. You have to add this code to the image.php file.
<?php wp_redirect(get_permalink($post->post_parent)) ; ?>
Once you add the code, save it and upload it to the root directory of your child theme.
Independent media pages will be suitable for photographers and graphic designers. But for other WordPress users, redirecting the attachments to the post or pages they belong is the right call.
If you have any further questions about the process, feel free to contact us anytime.
Ratings: 4.1 Stars (Capterra) | 4.1 Stars (GetApp) Booker by Mindbody is a prominent CRM…
Affiliate marketing software offers a smart and convenient solution for businesses to refine their marketing…
For medical practices, where a single client’s experience relies on multiple team members working in…
When creating and optimizing a website, one of the most important factors that some businesses…
One of the biggest challenges in creating an effective healthcare marketing strategy is recognizing that…
As more women become increasingly interested in vaginal rejuvenation, having appropriate and professional vaginal rejuvenation…