Illustration of web push subscribers and a domain change between two sites Illustration of web push subscribers and a domain change between two sites

What Happens to Web Push Subscribers If You Change Domain?

Web push subscribers don’t move when you change domain, because permission belongs to the old origin. Here is how to keep as many as you can.

If you change your domain, your web push subscribers don’t move with you. Each subscription and notification permission belongs to the origin that created it, so visitors must allow notifications again on the new domain. Existing subscribers may keep receiving messages for a while if the old domain stays online, but you should plan to rebuild the list.

Changing web push subscribers’ domain is one of those things nobody thinks about until the rebrand is already scheduled. I want to explain the browser rule behind it, what still works after a move, and how to lose as few subscribers as possible. I’ll stick to how browsers behave, because that part doesn’t depend on which push tool you use.

Why are web push subscriptions tied to a domain?

Web push subscriptions are tied to a domain because browsers grant notification permission and register service workers per origin. An origin is the scheme, host and port together, such as https://example.com. A different origin is, to the browser, a different site.

When a visitor subscribes, the browser registers your service worker for that origin and creates a PushSubscription, an endpoint plus keys. The permission to show notifications is also stored for that origin. MDN’s guide to the same-origin policy explains why browsers keep these separate. It’s a privacy protection: one site can’t reuse permission given to another.

Which changes count as a new domain?

Any change to the scheme, host or port creates a new origin. That includes more changes than people expect, such as moving from www to the bare domain.

ChangeNew origin?Subscribers carry over?
example.com to newbrand.comYesNo
www.example.com to example.comYesNo
http:// to https://YesNo
blog.example.com to example.com/blogYesNo
example.com/old-path to example.com/new-pathNoYes, same origin
New hosting company, same domainNoYes, if the service worker stays at the same URL

The last row matters. Moving hosts while keeping the same domain is fine for push, as long as the service worker file is still served at the same path. If you’re also changing protocol, see do you need HTTPS for web push.

What happens to existing subscribers after the move?

Existing subscriptions don’t disappear when you move. They still exist in subscribers’ browsers and in your push database, still linked to the old origin. Whether messages keep arriving depends on the old domain and your setup.

Here’s the key detail. The push service delivers a message to the browser, and the browser wakes the service worker that was registered for the old origin. That worker shows the notification, and its link can point to the new domain. So while the old service worker stays installed and your sending keys stay the same, old subscribers can often still receive messages.

However, I wouldn’t treat that as a migration. Browsers periodically check the service worker script for updates. If the old domain stops serving it, or redirects it, behaviour becomes unpredictable over time. In addition, new visitors on the new domain can’t join the old list at all.

Can a 301 redirect keep push subscribers?

No. A 301 redirect moves visitors and search rankings, but it doesn’t move notification permission or subscriptions. Browsers also refuse to register or update a service worker script that sits behind a redirect.

So the usual SEO move of redirecting every URL can break push on the old origin. If you want old subscribers to keep receiving messages for a while, keep serving the service worker file on the old domain with a normal 200 response. Redirect everything else.

How do you keep as many subscribers as possible?

You keep the most subscribers by running both domains for a while: send to the old list, link to the new domain, and invite people to subscribe again there. Plan it before the switch, not after.

  1. Install push on the new domain first, so the prompt is ready on day one.
  2. Keep the old domain online, with the service worker file served without a redirect.
  3. Send a short campaign to old subscribers announcing the new address.
  4. Link those notifications to a page on the new domain that shows the subscribe prompt.
  5. Keep sending to the old list until engagement fades, then retire it.
  6. Back up both lists and your keys before you change anything.

Expect some loss. Every old subscriber has to click “Allow” again, and some won’t. That’s normal, and it’s why a well-timed prompt on the new site matters. My guide to push permission prompt best practices covers how to ask again without annoying people.

Can a push provider move subscribers to a new domain for you?

Be careful with any promise of a seamless domain move. The browser rule applies to every tool, so a provider can’t transfer permission from one origin to another.

What a tool can help with is the work around it. For example, it can let you keep sending to the old list while you build the new one, or copy your settings and templates to the new site. Moving subscribers between push providers on the same domain is a different question, which I cover in what happens to subscribers when a push provider shuts down.

Who owns the subscribers during the move?

You own the relationship, but the technical list lives wherever your push data is stored. With a SaaS tool, that’s the vendor’s database. With a self-hosted panel, it’s your own server.

That matters during a domain change, because you’ll want both the old and new lists available for a while. I explain the ownership question in more detail in who owns push subscriber data.

Where does LaraPush fit?

LaraPush is a self-hosted panel, so subscriber tokens and keys stay on your own server, and one licensed server can run unlimited domains. That means you can add the new domain as a new site while the old one keeps running. Project cloning can duplicate a working setup onto a new domain, so you don’t rebuild settings from scratch.

It doesn’t change the browser rule: subscribers still need to allow notifications on the new domain. For anything beyond that, contact the LaraPush team or check the setup guide. You run the VPS, the licence covers one server, and there’s no free plan; see the pricing page and the features overview.

Frequently asked questions

Do I lose push subscribers if I change my domain name?

You can’t carry them over automatically, because subscriptions and permission belong to the old origin. Old subscribers may still receive messages for a while if the old domain keeps serving the service worker. To keep them long term, invite them to subscribe again on the new domain.

Does moving from www to non-www affect web push?

Yes. www.example.com and example.com are different origins, so subscriptions made on one don’t apply to the other. Pick one version before collecting subscribers and redirect the other. If you already have subscribers, treat the switch like any other domain change.

Can I redirect the old service worker file to the new domain?

No. Browsers won’t register or update a service worker script served through a redirect, and a cross-origin worker wouldn’t control the old origin anyway. Keep serving the service worker on the old domain with a normal response while you move subscribers over.

Does changing hosting companies affect push subscribers?

Not if the domain stays the same and the service worker file stays at the same URL. Push subscriptions depend on the origin and your sending keys, not on the hosting company. Move your push database and keys as well if the push server itself is changing.

How long should I keep the old domain for push?

Keep it as long as old subscribers still click your notifications, often several months. During that time, send occasional campaigns that link to the new domain and invite people to subscribe there. Retire the old list once engagement has clearly faded.

Leave a Reply

Your email address will not be published. Required fields are marked *