[Need Help] Index WordPress website images on Google

pankajjangir

Power Member
Joined
Mar 28, 2013
Messages
656
Reaction score
293
Hello,

I need help regarding indexing images of my wordpress website on Google Images.

I am using Rankmath SEO plugin. Now a days WordPress create seperate pages for attachments.

When I noindex attachment pages, Google doesn't show/grab images from my website. If I index the attachment pages, Google count it as duplicate pages and show the image attachment link instead of a post.

Can anyone help me regarding this?

Warm Regards
 
Hi,

I recommend to set the attachment pages to noindex, but keep images inside your posts with proper alt tags.
Use RankMath’s image sitemap (or any other sitemap you prefer) and Google will index them from the post, not from junk attachment URLs.
 
Hi,

I recommend to set the attachment pages to noindex, but keep images inside your posts with proper alt tags.
Use RankMath’s image sitemap (or any other sitemap you prefer) and Google will index them from the post, not from junk attachment URLs.
Can you tell me how to index product images on google images if they are on woocommerce?how to use RankMath’s image sitemap set
 
Hi,

I recommend to set the attachment pages to noindex, but keep images inside your posts with proper alt tags.
Use RankMath’s image sitemap (or any other sitemap you prefer) and Google will index them from the post, not from junk attachment URLs.
I changed the setting to noindex attachment pages.

But there i no option for image sitempa in RankMath's. There is only Attachments Sitemap option. But I already noindexed the attachments, then there is no need to activate the attachment sitemap.
 
Hi everyone,


I wanted to share some tips on how to properly index images on a WordPress site using Rank Math SEO plugin, especially regarding attachment pages.


1. Redirect attachment pages to the parent post/page where the image is used
This prevents Google from indexing empty attachment pages and ensures your images are associated with the actual content.


How to do it:
If you’re using Rank Math, enable the option that automatically redirects attachment URLs to the parent post URL.
Go to Rank Math > General Settings > Images, and turn on “Redirect Attachment URLs to Parent Post URL.”
This way, if someone or Google visits the attachment URL, they get redirected to the page where the image is actually embedded.




2. Make sure your images are properly optimized and accessible


  • Don’t block your image folders in robots.txt.
  • Use descriptive alt attributes on all images.
  • Embed images in posts or pages with relevant context, not just standalone images.



3. Create and submit an image sitemap
Rank Math can generate an image sitemap automatically.
Go to Rank Math > Sitemap Settings and ensure the image sitemap option is enabled.
Submit this sitemap to Google Search Console to help Google discover all your images.




4. Check Google Search Console
Use the URL inspection tool to verify that Google can access your pages and images.
In the Coverage section, check for any issues related to attachment pages or images.




Hope this helps anyone struggling with image indexing on WordPress!
 
Back
Top