If you have a lot of links to your site, but some of those links are pointing to pages that no longer exist and serve a 404 not found status code - those links technically are not helping or hurting your site in Google Search. John Mueller of Google said on Twitter if "link goes nowhere, so we drop it."
John explained this as if "you recommend something that doesn't exist anymore, it's really a useful recommendation, right?" Same thing with links, if Google finds links that lead to something that no longer exists, is that a useful recommendation? The answer is no and Google does not count them.
Here are those tweets:
The link goes nowhere, so we drop it. If you recommend something that doesn't exist anymore, it's really a useful recommendation, right?
— 🧀 John 🧀 (@JohnMu) November 18, 2021
This is not new, Google said links to 404s don't hurt your, even soft 404s - it is something we covered a lot here.
Can you fix the link after?
If they also changed all the reasons why those URLs were found in the first place (eg fixed the links), sure.
— 🧀 John 🧀 (@JohnMu) November 18, 2021
If you've changed the links & the redirects have been in place for a while, we have little need to check the old URLs (no links to them), so you'd also see little traffic to them in your logs, which is a good sign that perhaps the redirects aren't needed anymore.
— 🧀 John 🧀 (@JohnMu) November 18, 2021
Forum discussion at Twitter.