Zaraz not loading (missing zaraz/s.js)

Hello,

I am facing issue with loading zaraz on my website

TypeError: [workbox] Network request for https://domain.com/cdn-cgi/zaraz/s.js?z=xxx threw an error: Failed to fetch

I see that on url without www file is not found but on url with www everything is working, on my webserver in nginx configuration there is permanent redirect to url without www, how to handle this issue?

Can you share how is your redirection to non-www. urls configured in your nginx?

Thank you for reply.

My nginx configuration to redirect from www:

server {
    server_name www.my-website.com;
    return 301 $scheme://my-website.com$request_uri;
}

How does one visit your site using the www. subdomain, when you have that redirect set up?

If I understand correctly, then when someone visits https://www.my-website.com, then they are redirected to https://my-website.com, which then loads s.js properly. What would be step-by-step guide to reproduce the problem you’re describing from the user side?

1 Like