Yoast / wordpress-seo

Yoast SEO for WordPress
https://yoast.com/wordpress/plugins/seo/
Other
1.76k stars 891 forks source link

Attachments not redirecting to parent pages #9316

Closed SukcesStrony closed 6 years ago

SukcesStrony commented 6 years ago

With one of the latest Yoast SEO versions (7.x), the attachment redirection function has changed, breaking some of the pages and not functioning as described in the Yoast Knowledge Base.

See this info: https://kb.yoast.com/kb/redirect-image-attachment-urls/

The options says “Redirect attachment URLs to the attachment itself?” and checking this box does exactly that.

Meanwhile, prior to Yoast 7.x (not sure which one exactly), the option basically was “Redirect attachment URLs to PARENT POSTS WHICH THEY ARE ATTACHED TO?”.

On the info page linked above, the description says: “Redirect will automatically redirect the attachment URLs to the parent post.” and there’s info on how to attach or detach attachment from posts.

This change in behaviour was therefore rather not intentional and is a bug. Further, websites which use image galleries to link to pages or posts which the attachments are attached to are now broken, as link point to images rather than posts.

Please correct this function so that it still redirects attachments to the parent posts which they are attached to.

In an ideal situation, users should have the following options: 1) Redirect attachment URLs to parent posts which they are attached to (on by default AND TURNED ON IF THE CURRENT AND PREVIOUS REDIRECTION SETTING WAS TURNED ON, for backwards compatibility) – use the function which was used in Yoast 6.x 2) Redirect attachment URLs to attachments themselves – use the function which was used in Yoast 7.x 3) Do not redirect attachment URLs

Interlinked with forum post: https://wordpress.org/support/topic/bug-attachments-not-redirecting-to-parent-pages/#post-10101803

Best, Chris

michielheijmans commented 6 years ago

First: is it the attachment pages that are hurting you? If it's just a number of 'em, this is unlikely.

Joost did a write-up with more background and our fix: https://yoast.com/media-attachment-urls/

Please note that the plugin creates a 410 - not a 404 - for the attachment page, but will still show the image. Google needs to find these 410s first to be able to get rid of them from their index. Meanwhile, your site needs to function as intended, that is why we choose this solution and aligned that solution with Google. They agree that this is the fastest way. The plugin affects the attachment pages and the way they are handled, the rest remains untouched. See article for more. I hope that clarifies things.

sanderkie commented 6 years ago

Thank you @michielheijmans; I already read that page (it came up during the last Yoast update).

When I am googling for the exact name of a product, the first 2 search hits are still attachement-urls. By now they are redirected to the image, but that still makes them completely irrelevant causing 100% drop off and 0% conversion rate. The actual product page is not even listed.

So that 'little mistake' does seem to have a negative impact, no matter what Google says.

Note: this is a relative new product that was probably introduced after this bug occurred. Older products are thankfully still listed as usual.

jack2345A commented 6 years ago

@sanderkie - it deson't matter what Google says, it matters what Google DOES. Sometimes what google says and what google does is completely different.

Google wants any indexed content to be valuable to the reader.

Attachment pages or paginated pages of home page - do NOT provide any value. They should NOT be in any way or form in the Google index.

This is what Yoast doesn't understand - Google does NOT and will NOT release any information that will help you to reverse engineer its algo. Yoast thinks that he knows it all based on what he talks with the "google guys". But he completely lost the connection to reality.

pirlusa commented 6 years ago

I´ve updated Yoast and installed the Search Index Plugin but the problem was still around. I fixed it with a plugin which redirects 404 to 301, at least people get redirected to some post or category instead of a dumb attachement.

nfranver commented 5 years ago

@jack2345A I´m arriving late to the post with the same issues that you all faced a couple of months ago. I just want to know how is your site after all these months? Have you improved or recovered your rankings?

We are a big site, and because we have 40.000 images, our traffic drop more than 60%. We are still trying to recover, but in the last month and a half, nothing happened.

We installed the yoast plugin to fix the bug but we are now experiencing +35K crawl errors in GSC. That is affecting us because we are seeing a constant drop in visits and PV.

I want to ask you if you are still keeping the redirects? and if you faced crawl errors. Any suggestion to fix them? Waiting is not a possiblity since we lost revenues, rankings and we are struggling to reverse this situation.

Thanks for your help, all the updates are very welcome :) @SukcesStrony

jack2345A commented 5 years ago

@nfranver - my site hasn't recovered - in fact things are getting much worse. I think that recovering from such issue can take many many months. I coded all these pages to noindex and Google removed them 5 months ago but rankings didn't recover. In the past 5 months Google had many more algo updates that made things a lot worse for my site. I am getting a lot more traffic from Bing than Google at the moment.... This is absolutely bizarre as the site has been is good terms with Google in the past few years and I've constantly worked on improving quality.

The errors that you get are just because these pages have been removed so google can't find them - you can ignore these errors.

I lost a LOT of revenue as well but there is nothing much I can do apart of waiting and making more changes to the site.

There was also a HUGE Google update in August.

Did you check the links pointing to your site - I've noticed a lot of spammy links that I've disavowed last month.

Did anyone else manged to recover?

cezars commented 5 years ago

Any new update on how to fix this the best way possible. From yoas you don`t get any help as i try like many others wen i discover the problem that was made by him afecting millions of websites.. Having 17.000+ post and from that update i keep trying to recover...

Regards

nfranver commented 5 years ago

@cezars We've seen a recover since the last couple of weeks. We haven't recover all the traffic, but it has improved considerably.

This is what we did:

  1. Install the bug plugin form Yoast
  2. Erase all the attachment URL's in WMT
  3. Review links pointing to our site and send a disavow txt to Google

It took us 5 months. Still trying to recover all the visits. But at least we changed trends.

The question now is how to eliminate +35K errors in Google Search Console. Basically Yoast sitemap keeps sending all those URL's, that's why we haven't been able to reduce them.

We are considering going back to Google sitemp. But is is still in consideration. Does anyone uninstalled Yoast debug plugin? @jack2345A

pavbeatz commented 3 years ago

Right, I have written a whole page for yoast SEO on www.allseobasics.com and why it is the top SEO plugin.

First of all, I have several blogs and have used the attachment feature on several of my websites, and they seemed to work just fine, I have come to the conclusion that this may be in their new updates as SukcesStrony explained quickly code solution.

To be honest we are enow on Yoast version 13+ and these issues which have been outlined here have been long resolved.

Here I'am using Yoast 12 (my other music blog) ProducersBuzz - Music Production Website

Here I'am using Yoast 13+ (my 2nd music blog) MySoundPacks - Music Production Samples & Loops

As you can see this issue has been resolved on the new updates of yoast, I don't see the reason why anyone would use the old version of Yoast right?

Let me know if everyone else has found that this issue> I'm guessing no longer exists in the newer updates?

rafaviana commented 3 years ago

Hi, I'm facing this issue… 404 when visiting media permalinks. I think "Redirect attachment URLs" feature is not working properly. Anyone can confirm this?

Djennez commented 3 years ago

@rafaviana if you experience an issue, please open up a new bugreport following the guidelines, so that we can investigate this properly.

rafaviana commented 3 years ago

@rafaviana if you experience an issue, please open up a new bugreport following the guidelines, so that we can investigate this properly.

I'm not sure if it's related with Yoast, that's why I asked this first. I'll follow your suggestion, thank you 😉