• I realize images can get indexed by search engines, but on one of my sites the image is showing up as an individual blog post page that is accessible. How do I prevent this?

    For instance, our-logo.jpg in Media creates an accessible page like domain.com/our-logo that has the blog right sidebar with Recent Comments, Archives, etc.

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    That is normal WP behavior, domain.com/our-logo/ would be an attachment post. To prevent indexing, all such requests could have a noindex robots meta tag in any attachment post page. The responsible template would need modification in order to do this. Since templates belong to your theme, I recommend asking through your theme’s dedicated support channel on how best to accomplish this.

    A noindex tag is really just an advisory, less honest search bots could choose to ignore it. Google and responsible search bots should honor it though. You could force any attachment post requests to go 404 by setting appropriate query vars through the “pre_get_posts” action. If done, adding the noindex meta tag would serve no purpose.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.