Hello,
Redirecting attachments to the parent post is a good practice to ensure that Google displays your images in search results. By redirecting attachments to the parent post, you can prevent Google from indexing the attachment pages separately, which might lead to duplicate content issues and impact your SEO negatively.
Redirecting attachments to the parent post helps consolidate the SEO value of your images within the parent post, increasing the chances of Google displaying your images in search results.
If you want to redirect attachments to the parent post using Rank Math, you can follow the steps outlined in this knowledgebase article.
Thank you for raising this concern, and if you have any more questions or need further assistance, feel free to let us know!
Sources:
How to Redirect Attachments to the Media URL with Rank Math » Rank Math
Why You Shouldn’t Duplicate Posts/Pages » Rank Math
Should You Redirect Attachment Page URLs? » Rank Math
The #1 WordPress SEO Plugin in 2023 – Rank Math
How to Show Images in the Search Results » Rank Math
I know redirecting attachments is a good practice, but my concern is only about index and no index.
Hello,
Thank you for contacting support.
Redirecting the attachment pages is recommended and it will prevent those pages from being indexed, however, that won’t prevent the actual images from being indexed.
Those are two different pages and if you access the image files directly, not via the attachment page you’ll see that those are very much accessible and can be indexed.
We explain why we recommend doing it this way here: https://rankmath.com/kb/should-you-redirect-attachments/
Don’t hesitate to get in touch if you have any other questions.
Hi,
But, I can see no index checked with all the images to a post in the media library.
So, how could Google index those images and show in the search results?
Hello,
Thank you for your patience.
When you upload a media file to the WordPress Media Library, WordPress creates a separate media attachment page for each individual file, and having the attachment pages as “noindex” or redirecting to the parent page is actually the preferred method to handle those as my colleague mentioned above.
In essence, this means that there’s nothing to worry about the attachment pages as the images from the website can and will still be indexed, it’s just the attachment pages, which don’t hold any SEO value, that will not get indexed.
Looking forward to helping you.
Hello,
Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.
If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.
Thank you.