> ## Documentation Index
> Fetch the complete documentation index at: https://docs.notifique.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Configure on your website (Web)

> Step-by-step to add push to your site: domains, script, and sw.js in Notifique.

<Tip>
  Think of it as **installing the building intercom on your website**: you say which addresses can use it, paste a snippet on the page, and visitors can receive browser alerts.
</Tip>

## In a few words

1. Create a **Push App** in Notifique and copy the **appId**
2. In **⚙️ Settings → Web**, list your site **domains**
3. Download **sw\.js** (sw-loader) and place it at your site root
4. Paste the **script** in your site `<head>`, same code shown in the dashboard
5. Open the site, accept notifications, and test from the dashboard

## What you’ll do in the dashboard

| Where                         | What it is                             |
| ----------------------------- | -------------------------------------- |
| Push App screen → **Web** tab | Copy the ready-made script             |
| **⚙️ Settings → Web**         | Allowed domains (e.g. `mystore.com`)   |
| **Download sw-loader** button | File that becomes `sw.js` on your site |

<Note>
  The **appId** is already inside the script, just paste. No API key on the website.
</Note>

## Step 1: Create the Push App

1. Open [app.notifique.dev](https://app.notifique.dev) → **Push** → **New app**
2. Name it (e.g. “Store website”)
3. Note the **appId** on the app screen

## Step 2: Allowed domains

1. On the app screen, click **⚙️** (settings)
2. Expand the **Web** section
3. Enter **one domain per line**, without `https://`:
   * `mystore.com`
   * `www.mystore.com`
   * `app.mystore.com` (if you use a subdomain)
4. Click **Save changes**

If left empty, any site with your appId could register, **we recommend listing your domains**.

## Step 3: sw\.js file (recommended)

The browser needs a small file at your site root to deliver alerts under your domain name.

1. On the Push App **Web** tab, click **Download sw-loader**
2. Save the file as **`sw.js`** in your site project
3. It must open at `https://yoursite.com/sw.js` (e.g. `public/sw.js` in many projects)

This file is one line pointing to Notifique, **no edits needed** afterward.

## Step 4: Paste the script on your site

1. On the **Web** tab, copy the code from **Paste this code** (Service Worker / sw\.js mode)
2. Paste it in your site **`<head>`**, before `</head>`
3. It already includes your `appId` and `swPath: '/sw.js'`

Example (your `appId` will differ):

```html theme={null}
<script src="https://api.notifique.dev/v1/push/scripts/notifique-push.js"></script>
<script>
  NotifiquePush.init({ appId: 'YOUR_APP_ID', swPath: '/sw.js' });
</script>
```

Publish the site with both `sw.js` and the script live.

## Step 5: Test

1. Open the site in a browser (Chrome, Firefox, or Edge)
2. Accept **Allow notifications** if prompted
3. Send a test push from the Notifique dashboard
4. The alert should appear on desktop or mobile

## Can’t add sw\.js? (Wix, Shopify, etc.)

Some site builders **don’t allow** a root file. Then:

1. On the **Web** tab, use **without hosting a file** (fallback)
2. Paste the script **without** `swPath`
3. It works, but alerts may show Notifique’s name instead of yours

For the best experience, prefer **sw\.js** on your domain.

## Something went wrong?

| What happened        | What to check                                                   |
| -------------------- | --------------------------------------------------------------- |
| No permission prompt | Script in `<head>`? Browser console errors?                     |
| Permission denied    | User blocked it, try incognito or another browser               |
| Push doesn’t arrive  | Site domain listed in ⚙️ Web? Does `sw.js` open in the browser? |
| Domain error         | Site URL must match a listed domain (with or without `www`)     |

## Next steps

* [Integrate apps](/en/push-api/integracao/index)
* [API Quick Start](/en/push-api/como-funciona/quick-start), for backend sending
