DEV Community

Discussion on: Always use Google's URL Inspection tool when launching a new Site.

Collapse
 
gtb3nw profile image
GTB3NW

It's because there's a service worker which installs into the browser. Service workers even work when you visit a page offline, which is why it started working when the page 404'd, it kicks into action and fetches the content.

You should not configure your webserver to only give 200 responses, it can lead to google deranking you for manipulation and bots absolutely hammering your webserver with traffic because you respond to 200 on all their requests searching for exploits.

Collapse
 
dmitryame profile image
Dmitry Amelchenko

Good point, I guess I'd still redirect to /index.html so that it could load reactJS, but would respond appropriately with 404 from index.js if it's requesting non existing route.

Collapse
 
gtb3nw profile image
GTB3NW

Yep pretty much. VueJS has a good doc on this - router.vuejs.org/guide/essentials/...

Collapse
 
dmitryame profile image
Dmitry Amelchenko • Edited

@gtb3nw can you provide any evidence that Google may penalize for 200 responses. I tried to google and can't find any references to this rule.