Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Another additional bonus of doing that is that you can serve "true" 404 pages (i.e. not soft 404) for invalid URLs when the page is requested with the _escaped_fragment_= query parameter.


Another additional bonus of doing is that you can serve "true" 404 pages (i.e. not soft 404) for invalid URLs when the page is requested with the _escaped_fragment_= query parameter.

For one of our sites, the Angular router redirects the user to a "true" 404 page if the in-app page cannot be found, along with the troublesome URL.

For example:

https://example.com/products/name-does-not-exist/

Will do a JS redirect to:

https://example.com/not-found/?url=/products/name-does-not-e...

The /not-found/ URL serves a "true" 404 response.

We're still in early days, and have very little data to back up the pros or cons of doing it this way.

All I can say with any certainty is that for the several months now we have zero "soft" 404s listed in Webmaster Tools.


Interesting and good to know! I was actually wondering if a JS redirect would suffice.


Interesting and good to know! I was actually wondering if a JS redirect would suffice.

Hehe, as I say, take it with a grain of salt, as I have very little real data to back it up with :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: