问题原文
原帖链接 · Hettomei · CC BY-SA 3.0
In the last month, I've got an increased number of "soft 404" errors reported by Google webmaster tools which actually work well for users.
Configuration (maybe useless):
- I have a website built with rails 3.1
- Authentication is handled by the gem Devise
Problem:
- On this page http://en.bemyboat.com/yacht-charter/9965-sailboat-beneteau-oceanis-43
- Click on "Ask a Boat request" (a simple form, in GET to: http://en.bemyboat.com/boat_requests/new/9965)
- You are redirected with the HTTP status 302 to sign in
- You are then sent back to the new page if successfully sign in.
Google tells me that the link on "ask a boat request" returns a soft 404.
I can't make this form in "POST" (which will solve the problem) because we need to automatically redirect users back to the page after sign in. (the Gem Devise memorizes the "get" link.)
To simplify, the question is: How to protect a private page with authentication, reached with a simple "GET" and not to be penalized by Google as a "soft 404".
已采纳解答
原帖链接 · Stephen Ostermiller · CC BY-SA 4.0
Soft 404s are not a "penalty". Google reports them to you so that can evaluate whether or not they are actually problems. Google's John Mueller has this to say about 404 errors:
404 errors on invalid URLs do not harm your site’s indexing or ranking in any way. It doesn’t matter if there are 100 or 10 million, they won’t harm your site’s ranking. http://googlewebmastercentral.blogspot.ch/2011/05/do-404s-hurt-my-site.html
So there is no need to fix them if they are not actually problems.
Having said that, you don't want bots (including Googlebot) to submit your forms. You should block bots from crawling your form submission URLs using robots.txt:
User-Agent: *
Disallow: /boat_requests/
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
