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
-
Stuck on the 2nd page of google! Help
I run a McAfee Technical Support website. I has been 2.3 months since I have been practicing seo on it. It was slick until it appeared on the second page of google. But now it doesnt rank up as it's frozen. Can i get any advices and suggestions for my website to break the 2nd page cage. My website:-** mcafee.com/activate**
Intermediate & Advanced SEO | | six_figures0 -
Crawling/indexing of near duplicate product pages
Hi, Hope someone can help me out here. This is the current situation: We sell stones/gravel/sand/pebbles etc. for gardens. I will take a type of pebbles and the corresponding pages/URL's to illustrate my question --> black beach pebbles. We have a 'top' product page for black beach pebbles on which you can find different types of quantities (differing from 20kg untill 1600 kg). There is not any search volume related to the different quantities The 'top' page does not link to the pages for the different quantities The content on the pages for the different quantities is not exactly the same (different price + slightly different content). But a lot of the content is the same. Current situation:
Intermediate & Advanced SEO | | AMAGARD
- Most pages for the different quantities do not have internal links (about 95%) But the sitemap does contain all of these pages. Because the sitemap contains all these URL's, google frequently crawls them (I checked the logfiles) and has indexed them. Problems: Google spends its time crawling irrelevant pages --> our entire website is not that big, so these quantity URL's kind of double the total number of URL's. Having url's in the sitemap that do not have an internal link is a problem on its own All these pages are indexed so all sorts of gravel/pebbles have near duplicates. My solution: remove these URL's from the sitemap --> that will probably stop Google from regularly crawling these pages Putting a canonical on the quantity pages pointing to the top-product page. --> that will hopefully remove the irrelevant (no search volume) near duplicates from the index My questions: To be able to see the canonical, google will need to crawl these pages. Will google still do that after removing them from the sitemap? Do you agree that these pages are near duplicates and that it is best to remove them from the index? A few of these quantity pages do have intenral links (a few procent of them) because of a sale campaign. So there will be some (not much) internal links pointing to non-canonical pages. Would that be a problem? Thanks a lot in advance for your help! Best!1 -
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 -
Only 4 of my pages have been indexed out of 64 in total
Hi there, I submitted a sitemap for a new 64 page website 6 weeks ago and only a few pages have been indexed. The website shows in Google search but with a large amount of information on the website it should show higher. I have fetched and rendered 30 plus pages on the 9th September and others on the 16th September, today is the 5th October but in Webmaster tools, Google only acknowledge 1 page as indexed. I have checked the robots txt file which shows it is allowed. There are no messages for problems with crawl and no errors showing. The domain is www.urbaneforms.com . Can you offer a suggestion as to why we are not being indexed?
Intermediate & Advanced SEO | | simplyworld0 -
Google Indexing of Images
Our site is experiencing an issue with indexation of images. The site is real estate oriented. It has 238 listings with about 1190 images. The site submits two version (different sizes) of each image to Google, so there are about 2,400 images. Only several hundred are indexed. Can adding Microdata improve the indexation of the images? Our site map is submitting images that are on no-index listing pages to Google. As a result more than 2000 images have been submitted but only a few hundred have been indexed. How should the site map deal with images that reside on no-index pages? Do images that are part of pages that are set up as "no-index" need a special "no-index" label or special treatment? My concern is that so many images that not indexed could be a red flag showing poor quality content to Google. Is it worth investing in correcting this issue, or will correcting it result in little to no improvement in SEO? Thanks, Alan
Intermediate & Advanced SEO | | Kingalan10 -
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 -
I have removed over 2000+ pages but Google still says i have 3000+ pages indexed
Good Afternoon, I run a office equipment website called top4office.co.uk. My predecessor decided that he would make an exact copy of the content on our existing site top4office.com and place it on the top4office.co.uk domain which included over 2k of thin pages. Since coming in i have hired a copywriter who has rewritten all the important content and I have removed over 2k pages of thin pages. I have set up 301's and blocked the thin pages using robots.txt and then used Google's removal tool to remove the pages from the index which was successfully done. But, although they were removed and can now longer be found in Google, when i use site:top4office.co.uk i still have over 3k of indexed pages (Originally i had 3700). Does anyone have any ideas why this is happening and more importantly how i can fix it? Our ranking on this site is woeful in comparison to what it was in 2011. I have a deadline and was wondering how quickly, in your opinion, do you think all these changes will impact my SERPs rankings? Look forward to your responses!
Intermediate & Advanced SEO | | apogeecorp0 -
Indexing non-indexed content and Google crawlers
On a news website we have a system where articles are given a publish date which is often in the future. The articles were showing up in Google before the publish date despite us not being able to find them linked from anywhere on the website. I've added a 'noindex' meta tag to articles that shouldn't be live until a future date. When the date comes for them to appear on the website, the noindex disappears. Is anyone aware of any issues doing this - say Google crawls a page that is noindex, then 2 hours later it finds out it should now be indexed? Should it still appear in Google search, News etc. as normal, as a new page? Thanks. 🙂
Intermediate & Advanced SEO | | Alex-Harford0