Complete guide to OneSignal Web Push Notifications setup, requirements, browser compatibility, domain changes, and troubleshooting common issues for developers and website owners.
Your website must meet all of the following for Web Push to work:
Browser APIs required
Security & connection
api.onesignal.com
User state
To receive push on iOS or iPadOS:
manifest.json
file with required fieldsFollow Apple-specific steps to enable web push on iPhones and iPads running iOS 16.4+.
Browser | Windows PC | macOS | Android | iOS (iPhone, iPad) |
---|---|---|---|---|
Chrome | Yes | Yes | Yes | No |
Firefox | Yes | Yes | Yes | No |
Safari | No | Yes | No | Yes ¹ |
Microsoft Edge ² | Yes | Yes | Yes | No |
Opera ² | Yes | Yes | Yes | No |
Samsung Internet ² | No | No | Yes | No |
Yandex ² | Yes | Yes | Yes | No |
UC Browser ² | Yes | No | Yes | No |
Internet Explorer ³ | No | No | No | No |
DuckDuckGo | No | No | No | No |
Browser | Minimum Version Required |
---|---|
Google Chrome | Chrome 50+ |
Mozilla Firefox | Firefox 47+ |
Apple Safari | Safari 10+ (macOS), Safari 16.4+ (iOS/iPadOS 16.4+) |
Browsers tie web push subscriptions to a specific origin (domain/site URL) for security reasons. You cannot transfer subscribers between different origins - this is a browser limitation, not a OneSignal restriction.
Different origins include:
http://mysite.com
→ https://mysite.com
)www.mysite.com
vs mysite.com
)domain1.com
vs domain2.com
or sub1.domain.com
vs sub2.domain.com
)When changing your site’s origin, choose one of these approaches:
Best for: Most domain changes, especially when you want a clean migration
Best for: Most domain changes, especially when you want a clean migration
Best for: When you need to keep the same OneSignal App ID
Use Update an app API with:
name
: Your app/site namechrome_web_origin
: New site URLchrome_web_default_notification_icon
: Icon image URLDelete old subscribers to prevent duplicates:
Upgrading from HTTP to HTTPS creates a new origin. Follow the domain migration steps above since browsers treat HTTPS sites as completely separate from their HTTP versions.
Due to browser same-origin policy, you cannot use one OneSignal App for multiple origins like:
https://mysite.com
and https://www.mysite.com
https://main.com
and https://shop.main.com
https://mysite.com/en/
or https://mysite.com/es/
https://mysite.com/en/
or https://mysite.com/es/
https://en.mysite.com
or https://es.mysite.com
Web push operates at the origin level. For sites in subfolders (e.g., https://example.com/blog
), use the main origin (https://example.com
) for setup.
Special case: If you must place service workers in the subfolder, see Customizing Service Worker Integration.
Strongly discouraged. Browser push specifications change frequently, and OneSignal updates files immediately to maintain compatibility. Use OneSignal’s CDN URLs from your Web Push Settings instead.
Custom init
code only works with Custom Code Setup.
Typical Setup or Website Builder users: Custom init code will be ignored by the OneSignal SDK.
If you need to delay initialization, use the privacy methods.
See Web SDK setup > Local testing for complete local testing setup.
OneSignal can work alongside existing service workers and PWAs. See Integrating Multiple Service Workers for implementation details.
Plan accordingly when deploying critical updates.
For macOS Chrome users, ensure notifications are enabled for both:
Without both enabled, notifications won’t appear in the notification center.
Complete guide to OneSignal Web Push Notifications setup, requirements, browser compatibility, domain changes, and troubleshooting common issues for developers and website owners.
Your website must meet all of the following for Web Push to work:
Browser APIs required
Security & connection
api.onesignal.com
User state
To receive push on iOS or iPadOS:
manifest.json
file with required fieldsFollow Apple-specific steps to enable web push on iPhones and iPads running iOS 16.4+.
Browser | Windows PC | macOS | Android | iOS (iPhone, iPad) |
---|---|---|---|---|
Chrome | Yes | Yes | Yes | No |
Firefox | Yes | Yes | Yes | No |
Safari | No | Yes | No | Yes ¹ |
Microsoft Edge ² | Yes | Yes | Yes | No |
Opera ² | Yes | Yes | Yes | No |
Samsung Internet ² | No | No | Yes | No |
Yandex ² | Yes | Yes | Yes | No |
UC Browser ² | Yes | No | Yes | No |
Internet Explorer ³ | No | No | No | No |
DuckDuckGo | No | No | No | No |
Browser | Minimum Version Required |
---|---|
Google Chrome | Chrome 50+ |
Mozilla Firefox | Firefox 47+ |
Apple Safari | Safari 10+ (macOS), Safari 16.4+ (iOS/iPadOS 16.4+) |
Browsers tie web push subscriptions to a specific origin (domain/site URL) for security reasons. You cannot transfer subscribers between different origins - this is a browser limitation, not a OneSignal restriction.
Different origins include:
http://mysite.com
→ https://mysite.com
)www.mysite.com
vs mysite.com
)domain1.com
vs domain2.com
or sub1.domain.com
vs sub2.domain.com
)When changing your site’s origin, choose one of these approaches:
Best for: Most domain changes, especially when you want a clean migration
Best for: Most domain changes, especially when you want a clean migration
Best for: When you need to keep the same OneSignal App ID
Use Update an app API with:
name
: Your app/site namechrome_web_origin
: New site URLchrome_web_default_notification_icon
: Icon image URLDelete old subscribers to prevent duplicates:
Upgrading from HTTP to HTTPS creates a new origin. Follow the domain migration steps above since browsers treat HTTPS sites as completely separate from their HTTP versions.
Due to browser same-origin policy, you cannot use one OneSignal App for multiple origins like:
https://mysite.com
and https://www.mysite.com
https://main.com
and https://shop.main.com
https://mysite.com/en/
or https://mysite.com/es/
https://mysite.com/en/
or https://mysite.com/es/
https://en.mysite.com
or https://es.mysite.com
Web push operates at the origin level. For sites in subfolders (e.g., https://example.com/blog
), use the main origin (https://example.com
) for setup.
Special case: If you must place service workers in the subfolder, see Customizing Service Worker Integration.
Strongly discouraged. Browser push specifications change frequently, and OneSignal updates files immediately to maintain compatibility. Use OneSignal’s CDN URLs from your Web Push Settings instead.
Custom init
code only works with Custom Code Setup.
Typical Setup or Website Builder users: Custom init code will be ignored by the OneSignal SDK.
If you need to delay initialization, use the privacy methods.
See Web SDK setup > Local testing for complete local testing setup.
OneSignal can work alongside existing service workers and PWAs. See Integrating Multiple Service Workers for implementation details.
Plan accordingly when deploying critical updates.
For macOS Chrome users, ensure notifications are enabled for both:
Without both enabled, notifications won’t appear in the notification center.