dyaa
dyaa

Reputation: 1450

handling 404 in Angular-Meteor

I'm using Angular-meteor using the Angular UI-Router and i cannot handle the 404 errors, I'm wondering if anybody had to deal with that specially it's ABC for SEO.

Currently i'm redirecting any not found entities to the route /404 but with status code is 200.

For more information i'm also using Meteor's spiderable package for rendering the page.

Also i found Prerender.io has their own solution using this metatag :

<meta name="prerender-status-code" content="404">

Will Prerender be my solution or there's another way without dealing with other services !

Upvotes: 0

Views: 143

Answers (2)

dyaa
dyaa

Reputation: 1450

I Solved this issue by using jazeee's spiderable-longer-timeout fork. It adds the support for HTTP status errors by redirecting the user to a page that includes this HTML comment

<!-- response:status-code=404 -->

This way, we can ensure spiderable sends a 404 status code in the response headers

Upvotes: 0

Noah Wallace
Noah Wallace

Reputation: 118

I think Iron router has some built in functionality for this... Or use router configure

https://stackoverflow.com/a/27001708/1535018

Upvotes: 1

Related Questions