Google is indexing wordpress attachment pages
-
Hey,
I have a bit of a problem/issue what is freaking me out a bit. I hope you can help me. If i do site:www.somesitename.com search in Google i see that Google is indexing my attachment pages. I want to redirect attachment URL's to parent post and stop google from indexing them.
I have used different redirect plugins in hope that i can fix it myself but plugins don't work. I get a error:"too many redirects occurred trying to open www.somesitename.com/?attachment_id=1982 ".
Do i need to change something in my attachment.php fail? Any idea what is causing this problem?
get_header(); ?>
/* Run the loop to output the attachment. * If you want to overload this in a child theme then include a file * called loop-attachment.php and that will be used instead. */ get_template_part( 'loop', 'attachment' ); ?>
-
This plugin automatically 301 redirects image attachment pages to the parent post, simply install and activate, done:
http://wordpress.org/extend/plugins/attachment-pages-redirect/
-
Just because you make it yourself and it doesn't install from the control panel..... doesn't mean it is not a plugin.
However, it is a very specialized plugin that will do the job without cluttering anything else up.
Make sure you save a copy out to the side in case you loose it in updates.
-
I found a great solution for this without using a plugin:
http://www.lancelhoff.com/wordpress-disable-image-attachment-page-links/
It works for me on my site
Chad
-
Having same problem, i have so many duplicate pages (more than 350) and all them caused by wordpress attachments. All i can do as keri said link images to direct image url or dont link at all.
Right now i'm going to remove all hyper-links from images. Easy way.
No wait i used this option in yoast plugin and it redirects attachments. I don't know why its not working for "TauriU "
Tick: Redirect attachment URL's to parent post URL.
-
I insert the image via the image icon, then I put the link in as the URL of the image itself. There's a button that talks about which to link to, can't remember exactly what it's called, but look for that option in the link page.
-
Hi Keri, I'm also having problems dozens of Wordpress attachment pages being indexed in google. When you say you link directly to the image do you mean that when you add an image you use the add 'from URL' option?
-
What I have done on my wordpress site is to make sure I'm linking directly to the image and not to the attachment page. If someone clicks on the image, they get a nice large (2000 pixel wide) image by itself, no attachment page or anything. I don't know if that will work for you, but it does work in my case.
-
I wasn't able to figure out how this plugin works exactly:( lack of knowledge, on my part.
My site url is if this is any help. And if you click here http://tinyurl.com/8x55yh8 you see what google site:domainname.com search bring out. All those attachment pages should redirect to parent post URL's.
i hope this is at least a bit helpful information
-
OK, do you happen to have Live HTTP Headers for FireFox (or any other tool/plug-in that'd be able to record all http headers) so you can see what exactly is happening with the redirects?
If so, could you again paste that over to pastebin.com?
-
I tried your suggestion, but it doesn't work unfortunately
i m using custom permalink structure. /%postname%
is there any possibility that issue lays in " /%postname% " structure.
-
i have already done lots of optimization in Yoast plugin:) don't want to change plugins now. but i try it out when nothing else doesn't work
-
OK, there's nothing strange with the htaccess.
I'd suggest that you now disable all of the plug-ins expect for Yoast's just so you can debug if the issue is due to any other plug-ins installed.
I know it sounds strange, but I'd also suggest that you go to the permalinks section of the WordPress admin and update the settings - don't change anything at the moment, just update. Sometimes that can reset any issues with the permalinks.
-
i posted my site .htaccess file to pastebin.com. ulr http://pastebin.com/cLVNNCkb
List of active plug-ins.
AdRotate
Better Tag Cloud
Cleanup Wordpress
Contact Form 7
Featured Page Widget
Flexi Pages Widget
Link Carousel
MailChimp Widget
WordPress Importer
WordPress SEO by Yoast's
WP-Table Reloaded
WP SlimStat
WP SlimStat ShortCodes
I hope it help:) those freaking attachment pages are messing up my rankings:)
-
For more than 2 months I'd been tested another SEO plugin - SEO Ultimate. IMHO it is the best plugin for WP at the time. It is very flexible and it is possible to decide about almost every element of a page. It has follow/nofollow and index/noindex manager and tons of other features.
I don't have attachment pages indexed
-
Hmm, that's pretty strange. It sounds like you could have an issue with your htaccess file.
Could you paste your .htaccess file to pastebin.com?
You also said that you've attempted to use a few different plug-ins to achieve this - I'd suggest that you double check that the other plug-ins aren't active. Would you be able to send over a list of the plug-ins that are active too, in addition to the .htaccess file contents?
-
Thank you for a quick answer.
Yoast's SEO plug-in is my main SEO plugin. I have tried option in the plugin that should Redirect attachment URL's to parent post URL's. Unfortunately it doesn't work.
I get a error: "too many redirects occurred trying to open www.somesitename.com/?attachment_id=1982 ".
-
Hi there,
This is common with WordPress, attatchments by default have their own pages.
Have you heard of Yoast's SEO plug-in before?
http://yoast.com/wordpress/seo/
I'd recommend that you install Yoast's SEO plug-in, it has the ability to redirect attachment pages back to the main page which is what you're trying to achieve.
If you do use Yoast's SEO plug-in, let me know how you get on.
Good luck!
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Google has discovered a URL but won't index it?
Hey all, have a really strange situation I've never encountered before. I launched a new website about 2 months ago. It took an awfully long time to get index, probably 3 weeks. When it did, only the homepage was indexed. I completed the site, all it's pages, made and submitted a sitemap...all about a month ago. The coverage report shows that Google has discovered the URL's but not indexed them. Weirdly, 3 of the pages ARE indexed, but the rest are not. So I have 42 URL's in the coverage report listed as "Excluded" and 39 say "Discovered- currently not indexed." When I inspect any of these URL's, it says "this page is not in the index, but not because of an error." They are listed as crawled - currently not indexed or discovered - currently not indexed. But 3 of them are, and I updated those pages, and now those changes are reflected in Google's index. I have no idea how those 3 made it in while others didn't, or why the crawler came back and indexed the changes but continues to leave the others out. Has anyone seen this before and know what to do?
Intermediate & Advanced SEO | | DanDeceuster0 -
How would you handle these pages? Should they be indexed?
If a site has about 100 pages offering specific discounts for employees at various companies, for example... mysite.com/discounts/target mysite.com/discounts/kohls mysite.com/discounts/jcpenney and all these pages are nearly 100% duplicates, how would you handle them? My recommendation to my client was to use noindex, follow. These pages tend to receive backlinks from the actual companies receiving the discounts, so obviously they are valuable from a linking standpoint. But say the content is nearly identical between each page; should they be indexed? Is there any value for someone at Kohl's, for example, to be able to find this landing page in the search results? Here is a live example of what I am talking about: https://www.google.com/search?num=100&safe=active&rlz=1C1WPZB_enUS735US735&q=site%3Ahttps%3A%2F%2Fpoi8.petinsurance.com%2Fbenefits%2F&oq=site%3Ahttps%3A%2F%2Fpoi8.petinsurance.com%2Fbenefits%2F&gs_l=serp.3...7812.8453.0.8643.6.6.0.0.0.0.174.646.3j3.6.0....0...1c.1.64.serp..0.5.586...0j35i39k1j0i131k1j0i67k1j0i131i67k1j0i131i46k1j46i131k1j0i20k1j0i10i3k1.RyIhsU0Yz4E
Intermediate & Advanced SEO | | FPD_NYC0 -
Why would my total number of indexed pages stop increasing?
I have an ecommerce marketplace that has new items added daily. In search consoloe my pages have always gone up almost every week. It hasn't increased in 5 weeks. We haven't made any changes to the site and the sitemap looks good. Any ideas on what I should look for?
Intermediate & Advanced SEO | | EcommerceSite0 -
Do internal links from non-indexed pages matter?
Hi everybody! Here's my question. After a site migration, a client has seen a big drop in rankings. We're trying to narrow down the issue. It seems that they have lost around 15,000 links following the switch, but these came from pages that were blocked in the robots.txt file. I was wondering if there was any research that has been done on the impact of internal links from no-indexed pages. Would be great to hear your thoughts! Sam
Intermediate & Advanced SEO | | Blink-SEO0 -
Is there a way to get a list of Total Indexed pages from Google Webmaster Tools?
I'm doing a detailed analysis of how Google sees and indexes our website and we have found that there are 240,256 pages in the index which is way too many. It's an e-commerce site that needs some tidying up. I'm working with an SEO specialist to set up URL parameters and put information in to the robots.txt file so the excess pages aren't indexed (we shouldn't have any more than around 3,00 - 4,000 pages) but we're struggling to find a way to get a list of these 240,256 pages as it would be helpful information in deciding what to put in the robots.txt file and which URL's we should ask Google to remove. Is there a way to get a list of the URL's indexed? We can't find it in the Google Webmaster Tools.
Intermediate & Advanced SEO | | sparrowdog0 -
Same content pages in different versions of Google - is it duplicate>
Here's my issue I have the same page twice for content but on different url for the country, for example: www.example.com/gb/page/ and www.example.com/us/page So one for USA and one for Great Britain. Or it could be a subdomain gb. or us. etc. Now is it duplicate content is US version indexes the page and UK indexes other page (same content different url), the UK search engine will only see the UK page and the US the us page, different urls but same content. Is this bad for the panda update? or does this get away with it? People suggest it is ok and good for localised search for an international website - im not so sure. Really appreciate advice.
Intermediate & Advanced SEO | | pauledwards0 -
Google cached pages and search terms
Here's something I noticed. We have a rank A page and it's ranking 10 on Google search results. When I hover my mouse over our search result, Google gives us a preview, but Google also highlights in red where the search keyword is present on the page. Reviewing our page, even though we have it as the h1 header and intro paragraph, Google is highlighting it half way down the page. Any ideas why? I review rank 1 - 5 and Google highlights the keyword on the intro paragraph and h1 header Have you guys experienced anything like this? It makes me think..Google could be crawling my site and thinking I haven't got it in the h1 or intro paragraph etc.. Thoughts?
Intermediate & Advanced SEO | | Bio-RadAbs0 -
Google Generating its Own Page Titles
Hi There I have a question regarding Google generating its own page titles for some of the pages on my website. I know that Google sometimes takes your H1 tag and uses it as a page title, however, can anyone tell me how I can stop this from happening? Is there a meta tag I can use, for example like the NOODP tag? Or do I have to change my page title? Thanks Sadie
Intermediate & Advanced SEO | | dancape0