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 Indexing Request - Typical Time to Complete?
In Google Search Console, when you request the (re) indexing of a fetched page, what's the average amount of time it takes to re-index and does it vary that much from site to site or are manual re-index request put in a queue and served on a first come - first serve basis despite the site characteristics like domain/page authority?
Intermediate & Advanced SEO | | SEO18050 -
Why did Google cache & index a different domain than my own?
We own www.homemenorca.com, a real estate website based in Spain. Pages from this domain are not being indexed: https://www.google.com/search?q=site%3Awww.homemenorca.com&oq=site%3Awww.homemenorca.com&aqs=chrome..69i57j69i58j69i59l2.3504j0j7&sourceid=chrome&ie=UTF-8Please notice that the URLs are Home Menorca, but the titles are not Home Menorca, they are Fincas Mantolan, a completely different domain and company: http://www.fincasmantolan.com/. Furthermore, when we look at Google's cache of Home Menorca, we see a different website: http://webcache.googleusercontent.com/search?q=cache%3Awww.homemenorca.com%2Fen&oq=cache%3Awww.homemenorca.com%2Fen&aqs=chrome..69i57j69i58j69i59.1311j0j4&sourceid=chrome&ie=UTF-8We reviewed Google Search Console, Google Fetch, the canonical tags, the XML sitemap, and many more items. Google Search Console accepted our XML sitemap, but is only indexing 5-10% of the pages. Google is fetching and rendering the pages properly. However, we are not seeing the correct content being indexed in Google. We have seen issues with page loading times, loading content longer than 4 seconds, but are unsure why Google would be indexing a different domain.If you have suggestions or thoughts, we would very much appreciate it.Additional Language Issue:When a user searches "Home Menorca" from America or the UK with "English" selected in their browser as their default language, they are given a Spanish result. It seems to have accurate hreflang annotations within the head section on the HTML pages, but it is not working properly. Furthermore, Fincas Mantolan's search result is listed immediately below Home Menorca's Spanish result. We believe that if we fix the issue above, we will also fix the language issue. Please let us know any thoughts or recommendations that can help us. Thank you very much!
Intermediate & Advanced SEO | | CassG12340 -
Google Indexed my Site then De-indexed a Week After
Hi there, I'm working on getting a large e-commerce website indexed and I am having a lot of trouble.
Intermediate & Advanced SEO | | Travis-W
The site is www.consumerbase.com. We have about 130,000 pages and only 25,000 are getting indexed. I use multiple sitemaps so I can tell which product pages are indexed, and we need our "Mailing List" pages the most - http://www.consumerbase.com/mailing-lists/cigar-smoking-enthusiasts-mailing-list.html I submitted a sitemap a few weeks ago of a particular type of product page and about 40k/43k of the pages were indexed - GREAT! A week ago Google de-indexed almost all of those new pages. Check out this image, it kind of boggles my mind and makes me sad. http://screencast.com/t/GivYGYRrOV While these pages were indexed, we immediately received a ton of traffic to them - making me think Google liked them. I think our breadcrumbs, site structure, and "customers who viewed this product also viewed" links would make the site extremely crawl-able. What gives?
Does it come down to our site not having enough Domain Authority?
My client really needs an answer about how we are going to get these pages indexed.0 -
Why Is Google Indexing These Product Pages On Shopify?
How can we communicate to Google the exact product pages we'd like indexed on our site? We're an apparel company that uses Shopify as our ecommerce platform. Website is sportiqe.com. Currently, Google is indexing all types of different pages on our site. **Example of a product page we want indexed: ** Product Page: sportiqe.com/products/PRODUCT-TITLE (Like This) **Examples of product pages being indexed: ** sportiqe.myshopify.com/products/PRODUCT-TITLE sportiqe.com/collections/COLLECTION-NAME/products/PRODUCT-TITLE See attached for an example of how two different "Boston Celtics Grateful Dead" shirts are being indexed. Any suggestions? We've used both Shopify and Google Webmaster tools to set our preferred domain (sportiqe.com). We've also added this snippet of code to our site three months ago thinking that would do the trick... {% if template == 'product' %}{% if collection %} {% endif %}{% endif %} sKwNZOl
Intermediate & Advanced SEO | | farmiloe0 -
My indexed pages count is shrinking in webmaster tools. Is this normal ?
I noticed that our total # of indexed pages dropped recently by a substantial amount (see chart below) Is this normal? http://imgur.com/4GWzkph Also, 3 weeks after this started dropping, we got a message on increased # of crawl errors and found that a site update was causing 300+ new 404s. could this be related ?
Intermediate & Advanced SEO | | znotes0 -
Certain Product Pages Not Indexing
Hey All, We discovered an issue where new product pages on our site were not getting indexed because a "noindex" tag was inadvertently being added to section when those pages were created. We removed the noindex tag in late April and some of the pages that had not been previously indexed are now showing up, but others are still not getting indexed and I'd appreciate some help on why this could be. Here is an example of a page that was not in the index but is now showing after removal of noindex: http://www.cloud9living.com/san-diego/gaslamp-quarter-food-tour And here is an example of a page that is still not showing in the index: http://www.cloud9living.com/atlanta/race-a-ferrari UPDATE: The above page is now showing after I manually submitted it in WMT. I had previously submitted another page like a month ago and it was still not indexing so I thought the manual submission was a dead end. However, it just so happens that the above URL just had its Page Title and H1 updated to something more specific and less duplicative so I am currently running a test to see if that's the problem with these pages not indexing. Will update this soon. Any suggestions? Thanks!
Intermediate & Advanced SEO | | GManSEO0 -
Can too many "noindex" pages compared to "index" pages be a problem?
Hello, I have a question for you: our website virtualsheetmusic.com includes thousands of product pages, and due to Panda penalties in the past, we have no-indexed most of the product pages hoping in a sort of recovery (not yet seen though!). So, currently we have about 4,000 "index" page compared to about 80,000 "noindex" pages. Now, we plan to add additional 100,000 new product pages from a new publisher to offer our customers more music choice, and these new pages will still be marked as "noindex, follow". At the end of the integration process, we will end up having something like 180,000 "noindex, follow" pages compared to about 4,000 "index, follow" pages. Here is my question: can this huge discrepancy between 180,000 "noindex" pages and 4,000 "index" pages be a problem? Can this kind of scenario have or cause any negative effect on our current natural SEs profile? or is this something that doesn't actually matter? Any thoughts on this issue are very welcome. Thank you! Fabrizio
Intermediate & Advanced SEO | | fablau0 -
How do I increase rankings when the indexed page is the homepage?
Hi Forum, This is a two-part question. The first is: "what may be the cause of some rank declines?" and the second is "how do I bring them back up when the indexed page is the homepage?" Over the last week I noticed some declines in several of my top keywords, many of which point to the site's homepage. The site itself is an eCommerce site, which had less visits last week than normal (holidays it seems, since the data jibes with key dates). Can a decline in traffic cause ranking declines? Any other ideas of where to look? Secondly, for those keywords that link to the homepage, how do we bring these back up since a homepage can't be optimized for every single keyword? We sell yoga products and can't have a homepage that is optimized for keywords like "yoga mat," "yoga blocks," "yoga pilates clothing," and several others, as these are our category pages' keywords. Any thoughts? Thanks!
Intermediate & Advanced SEO | | pano0