5 ms·
Redirecting to a dedicate 404 page is bad SEO practice. There must be a better way to accomplish this.
by ewalk153 3y ago
Redirecting to a dedicate 404 page is bad SEO practice. There must be a better way to accomplish this.
- Arnt 3y agoThis is the better way. The redirection happens inside the server. Rack Attack runs early in the request processing and says "do the rest of the processing as if the client's request were for a page that does not exist", then the server acts accordingly.
- kawsper 3y agoIt's also a bad user experience. If I mistyped a URL, and just need to change one letter, now I can't because I've been redirected.
- Arnt 3y agoYou haven't been redirected. The redirection happens inside the server, it's never communicated to the client. Well, almost inside the server. The server first does TLS processing, then this part, then that which the backend developers see as "the server". From a backend developer's perspective, this code runs in the zone between browser and server, where load balancers and such live. Operationally the code runs on in the same rack, probably on the same CPU, as the backend code.
- pmontra 3y agoAlmost all the Rails apps I worked on in the past 18 years don't care about SEO because they don't have much that googlebot can browse without an account. Everything important is either behind a login form or served through an API. The API is probably used by a JS frontend, which googlebot browses, and it's up to the frontend to deal with 404 and other errors in a gracious way. Finally, if the API is machine to machine, there are no worries about SEO.