Google’s John Mueller recently shared guidance regarding invalid URLs on a website.
An invalid URL should return a 404 error so Google can understand that the URL does not belong to a particular site. A 5XX error doesn’t convey that message.
Mueller shared this information on Twitter in response to an SEO professional tweeting about Google Search Console discovering 5XX errors.
The SEO professional tweeted: “Got an alert from Google Search Console today that one of our pages is 5XX – after investigation it’s a mention of our link in the footnotes of a scientific pdf article: as there is a semicolon right after the URL, the URL is not valid. Had no idea Google Search Console was this thorough!”
Mueller did not comment on the Search Console’s capability to identify this error. Instead, he focused on the distinction between server errors and 404 errors.
Site owners should typically avoid having URLs that trigger 5XX server errors, regardless of their source, according to Mueller.
He stated, “If URLs are invalid for your site, you should return 404 so that it’s clear that they’re not valid for your site.”
In a response to a follow-up question, Mueller explained that Google will continue to crawl a 404 page as long as there are signals for the URL somewhere on the web.
He mentioned, “As long as we have signals for that URL (even if it’s just a random link somewhere), we’ll keep trying it from time to time.”