How to add service worker file to root directory

I am using subscriber website for adding subscribers to site. In order to do this , service worker file is required to be added to site root directory. Below is the outline mentioned on subscriber.com-

Since your site is using the https protocol, you will want to upload a service worker file that will handle your site’s notification delivery. If you have access to your site’s root directory (usually via FTP), download the file below and upload it to the root of your site.

Request to help me or is there any other option to for push notification for site.
Urgent help required

You can’t access the root directory in Wix.

You will have to look at using a new custom tool in Tracking and Analytics section.
https://support.wix.com/en/article/embedding-custom-code-to-your-site

Also, note that as this is third party provided code, that Wix won’t provide support for it and you will need to be going through the third party providers own support for more help with this.
https://support.wix.com/en/article/using-iframes-to-display-visible-content-on-your-site
Wix cannot provide support for external codes that were not created or tested with Wix.
If you are experiencing an issue with your code snippet, please contact the provider directly.

Yes, it’s possible! You can see Push Notification in Wix to add a service worker to the root directory and set up Push notifications on your Wix site.

1 Like

Currently you cannot upload a file in the root folder on Wix, however there is a workaround.
Here’s a tutorial for adding web push notifications to Wix (using the service worker “scope” option):

https://blog.pushpad.xyz/2022/10/add-push-notifications-to-wix/