Dealing with image attachment pages creating duplicate title tags!?
- SEO |
How do you guys deal with the issue of image attachment pages in WordPress creating duplicate title tags?
Google WMT shows some duplicate title tags that are caused by image attachment pages. I am using platinum SEO plugin and it doesn't have any option for no indexing attachment pages (you get the option on each attachment edit page, but not in the main dashboard. I have hundreds of images, so it would be kind of hard to go edit one by one).
I read some stuff and they all point to other plugins. But to be honest I don't want to install a new plugin or replace this one since it has lots of customized setting now (been using it for the last 3 years on the site).
I also found another solution which was to redirect the attachment page to the parent post page using this code <?php wp_redirect(get_permalink($post->post_parent)); ?> in Attachment.php or image.php
But when I do that, the page doesn't load, it gives the the server is redirecting the request for this address in a way that will never complete error.
Is there any way to manually noindex attachment pages through the attachment.php file. I know you could add <META NAME="ROBOTS" CONTENT="NOINDEX, FOLLOW">, but where exactly in the file do you add this?...
Or do you guys deal with this issue in a different way?...
I would appreciate some help. Thanks in advance.
-
steeltape -
Thanks
{{ DiscussionBoard.errors[8487612].message }} -
-
yukon Banned-
Thanks
{{ DiscussionBoard.errors[8488901].message }} -