• Resolved samvel777

    (@samvel777)


    Hello.

    I faced an issue related to PWA plugin. When somebody first time open our site’s not existing page he can see 404 Not Found Page. It’s correct. But when you try to open same non-existing ( or some other non-existing ) page, instead of 404 Not Found the user see homepage under that url. Ex.

    https://mysite.com/sdfdsfdsf – 404 Not found ( it’s ok )
    https://mysite.com/sdfdsfdsf – shows homepage on second attemp.

    Please, provide some option to fix this part.

    P.S I had switched Caching Strategies to other options. Nothing helped.

    P.P.S The answer from server for second attemp to non-existing page shows 200 Ok by Service Workers

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Magazine3

    (@magazine3)

    Add your 404 pages in PWA settings => Setup => 404 page. Select here your 404 pages.
    as shown in this link (https://prnt.sc/sisrz8).

    currently, there is “–Default–” value selected, that’s the reason the home page is shown.

    Thread Starter samvel777

    (@samvel777)

    Some notes about that option. WordPress themes have their own template files for 404 requests. So, any user had to create page to show 404. But it’s page. It’ll be indexed by search engines as page and not as 404.

    Ok, let’s leave it as you suggested. My another related question. Even after configuring that setting ( PWA settings => Setup => 404 page ) the second time request is returns 200 Status Code from Service Workers and not 404. How to make it work as should (when the page is not exists in site, any request should show 404 Status code) ?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PWA shows homepage instead of 404’ is closed to new replies.