Problem with URLs having "/?attachment_id=" at the end

Posted in: Newsmag
Post count: 30

While I was looking up for something in my web site via Google, I came upon with a result with a URL as given below:

https://www.teknoblog.com/page/230/?attachment_id=clnasnpmjqkrrxra

Interestingly, Google crawled and indexed a page with “/?attachment_id=clnasnpmjqkrrxra”. It seems that, with this special parameter, blog version of original page (in this situation, it is https://www.teknoblog.com/page/230/) was created, and weirdly, indexed by Google. If you apply this special parameter to homepage or any other paginated page of home, you can see the result like this. The page includes full versions of listed posts.

It may cause duplicate content problem in Google’s side. And it seems that it is a problem related to this theme. How can I avoid this?

Kindly regards,

Sabri

Post count: 9544

Normally you would have your attachments set to redirect to the post and not load the attachments; WP creates attachment pages for every bit of media you add to a post, much like day, date, month indexes. As long as you have your canonical URL clearly shown in your meta data, in the head (via view page source), you generally don’t need to worry about alternate versions of posts/pages. But again, most folks redirect attachments to the parent page/post.

Post count: 30

I know this about the posts, but what I am talking about is the pages. My situation is related to pages, and this is something different from the attachments linked to the post. Besides, I have already set the attachment pages as noindex. But again, this is something different.

Post count: 20688

Hi,

Seems this extra parameter is located for each link in the pagination of the homepage
https://www.screencast.com/t/B2IVI5UY
But I have checked in a default theme and WordPress install, that extra parameter is not present
https://www.screencast.com/t/h8kJ9HJ4Z
Maybe it is added there by a plugin or as the result of custom code, I have no exact solution.

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newsmag’ is closed to new topics and replies.