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
-
301 migration - Indexed Pages rising on old site
Hello, We did a 301 redirect from site a to site b back in March. I would check on a daily basis on the index count using query "site:sitename" The past couple of days, the old domain (that was 301 redirected) indexed pages has been rising which is really concerning. We did a 301 redirect back in march 2016, and the indexed count went from 400k pages down to 78k. However, the past 3 days it went from 78k to 89,500. And I'm worried that the number is going to continue to rise. My question - What would you do to investigate / how to investigate this issue? Would it be screaming frog and look at redirects? Or is this a unique scenario that I'd have to do other steps/procedures?
Intermediate & Advanced SEO | | ggpaul5620 -
HTTP Pages Indexed as HTTPS
My site used to be entirely HTTPS. I switched months ago so that all links in the pages that the public has access to are now http only. But I see now that when I do a site:www.qjamba.com, the results include many pages with https in the beginning (including the home page!), which is not what I want. I can redirect to http but that doesn't remove https from the indexing, right? How do I solve this problem? sample of results: Qjamba: Free Local and Online Coupons, coupon codes ... **<cite class="_Rm">https://www.qjamba.com/</cite>**One and Done savings. Printable coupons and coupon codes for thousands of local and online merchants. No signups, just click and save. Chicnova online coupons and shopping - Qjamba **<cite class="_Rm">https://www.qjamba.com/online-savings/Chicnova</cite>**Online Coupons and Shopping Savings for Chicnova. Coupon codes for online discounts on Apparel & Accessories products. Singlehop online coupons and shopping - Qjamba <cite class="_Rm">https://www.qjamba.com/online-savings/singlehop</cite>Online Coupons and Shopping Savings for Singlehop. Coupon codes for online discounts on Business & Industrial, Service products. Automotix online coupons and shopping - Qjamba <cite class="_Rm">https://www.qjamba.com/online-savings/automotix</cite>Online Coupons and Shopping Savings for Automotix. Coupon codes for online discounts on Vehicles & Parts products. Online Hockey Savings: Free Local Fast | Qjamba **<cite class="_Rm">www.qjamba.com/online-shopping/hockey</cite>**Find big online savings at popular and specialty stores on Hockey, and more. Hitcase online coupons and shopping - Qjamba **<cite class="_Rm">www.qjamba.com/online-savings/hitcase</cite>**Online Coupons and Shopping Savings for Hitcase. Coupon codes for online discounts on Electronics, Cameras & Optics products. Avanquest online coupons and shopping - Qjamba <cite class="_Rm">https://www.qjamba.com/online-savings/avanquest</cite>Online Coupons and Shopping Savings for Avanquest. Coupon codes for online discounts on Software products.
Intermediate & Advanced SEO | | friendoffood0 -
Why are some pages indexed but not cached by Google?
The question is simple but I don't understand the answer. I found a webpage that was linking to my personal site. The page was indexed in Google. However, there was no cache option and I received a 404 from Google when I tried using cache:www.thewebpage.com/link/. What exactly does this mean? Also, does it have any negative implication on the SEO value of the link that points to my personal website?
Intermediate & Advanced SEO | | mRELEVANCE0 -
Why is this page not being delivered for Google search result?
Hey folks, Figured I would try to get an experts insight on this. On google search result for BLACK TITANIUM RINGS + TITANIUM-JEWELRY.COM the page that I "think" should show up is this one: http://www.titanium-jewelry.com/black-titanium-rings.html However, it does not. Imho, this page is highly relevant. I used Rank Tracker here on seomoz.org and the page is not even in top 50 of search engine results for google. Our 'About Black Titanium Rings' page ranks #2 (http://www.titanium-jewelry.com/about-black-titanium.html) but the /black-titanium-rings.html page doesn't even rank. Any suggestions on what I could look at to figure out why this page is being penalized? We are not under a manual penalty (anymore!). Thanks! Ron
Intermediate & Advanced SEO | | yatesandcojewelers0 -
Why Does Ebay Allow Internal Search Result Pages to be Indexed?
Click this Google query: https://www.google.com/search?q=les+paul+studio Notice how Google has a rich snippet for Ebay saying that it has 229 results for Ebay's internal search result page: http://screencast.com/t/SLpopIvhl69z Notice how Sam Ash's internal search result page also ranks on page 1 of Google. I've always followed the best practice of setting internal search result pages to "noindex." Previously, our company's many Magento eCommerce stores had the internal search result pages set to be "index," and Google indexed over 20,000 internal search result URLs for every single site. I advised that we change these to "noindex," and impressions from Search Queries (reported in Google Webmaster Tools) shot up on 7/24 with the Panda update on that date. Traffic didn't necessarily shoot up...but it appeared that Google liked that we got rid of all this thin/duplicate content and ranked us more (deeper than page 1, however). Even Dr. Pete advises no-indexing internal search results here: http://www.seomoz.org/blog/duplicate-content-in-a-post-panda-world So, why is Google rewarding Ebay and Sam Ash with page 1 rankings for their internal search result pages? Is it their domain authority that lets them get away with it? Could it be that noindexing internal search result pages is NOT best practice? Is the game different for eCommerce sites? Very curious what my fellow professionals think. Thanks,
Intermediate & Advanced SEO | | M_D_Golden_Peak
Dan0 -
Best practice for removing indexed internal search pages from Google?
Hi Mozzers I know that it’s best practice to block Google from indexing internal search pages, but what’s best practice when “the damage is done”? I have a project where a substantial part of our visitors and income lands on an internal search page, because Google has indexed them (about 3 %). I would like to block Google from indexing the search pages via the meta noindex,follow tag because: Google Guidelines: “Use robots.txt to prevent crawling of search results pages or other auto-generated pages that don't add much value for users coming from search engines.” http://support.google.com/webmasters/bin/answer.py?hl=en&answer=35769 Bad user experience The search pages are (probably) stealing rankings from our real landing pages Webmaster Notification: “Googlebot found an extremely high number of URLs on your site” with links to our internal search results I want to use the meta tag to keep the link juice flowing. Do you recommend using the robots.txt instead? If yes, why? Should we just go dark on the internal search pages, or how shall we proceed with blocking them? I’m looking forward to your answer! Edit: Google have currently indexed several million of our internal search pages.
Intermediate & Advanced SEO | | HrThomsen0 -
Google+ Pages on Google SERP
Do you think that a Google+ Page (not profile) could appear on the Google SERP as a Rich Snippet Author? Thanks
Intermediate & Advanced SEO | | overalia0 -
Google Page Rank Dead?
Does PR still work? I have sites that have PR3 and get almost no traffic and sites that are PR1 and get thousands of uniques per month. My PR on my main sites haven't moved for about 7 years, even though we've grown significantly. I know lots of you are going to jump in with get the MOZ toolbar, which I already have done, and I agree, it's great ... But can anyone tell me about what's going on with Google PR? Is it still active? Or has Google abandoned? I noticed that the Google toolbar is not even available for Google Chrome. That should say something ... If you like this question, do me a favor, and give me a THUMBS UP!
Intermediate & Advanced SEO | | applesofgold2