I Google Search Console, I keep getting a "Soft 404" error for links that point to a zip file.
The html looks like this:
<a href="/downloads.php?id=7" title="Description" download>Click here</a>
When clicked, the url is generated like this:
header("Location: " . $row["url"]);
Where the url is something link: https://www.example.com/file.zip
So the page is not a 404 - in fact it's not a page, but a file. How can I fix this for Google?
header("Location: " . $row["url"]);
This generates a 302 status code response by default.
You could make this a 301, that should make this “soft 404” go away - but then Google will identify https://www.example.com/file.zip
as the actual target URL, and index that one, and show it as a search result.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.