Angular 6 SSR : a true 404 / not found page with an 404 HTTP status code

Discussão em 'Angular' iniciado por Germs, Agosto 25, 2025.

  1. Germs

    Germs Guest

    I struggle to settle a 404 page that returns to navigators/crawlers a specific HTTP status code : 404. Following SSR guide in https://angular.io/guide/universal, my application is correctly served with SSR.

    I set a 'PageNotfound' route in my app-routing.module.ts :


    {path: '*', component: NotFoundComponent}

    But obviously it still returns 200 as http return statuses. How I can change http return code for this specific route ?

    Continue reading...

Compartilhe esta Página