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

# Custom Domains

> Use your own domain for Snipp post links.

## Overview

You can serve Snipp post links from your own domain by setting up a redirect from `example.com/[code]` to `snipp.gg/p/[code]`. This is a DNS-level redirect that you configure with your own domain provider. Snipp does not host your domain.

Because the redirect catches every path on your domain, your custom domain should be dedicated to Snipp. Do not point a domain you also use for a website or other services.

The address bar will switch to `snipp.gg` after the redirect completes. Snipp does not currently offer true custom hostnames where the URL stays on your domain.

Custom domains are available on every plan, including Free. There is nothing to enable in your account settings, since the redirect is configured entirely on your own domain.

If you are a Plus Subscriber, you can pair a custom domain with the **Custom Embeds** feature to fully personalize how your posts appear when shared. When combined, the two features let you present uploads under your own brand and design rather than the default Snipp look.

<Note>
  We are working on the ability to set a custom domain as your default link domain across Snipp. Once shipped, copied links and shared URLs will use your chosen domain automatically, so you will not have to swap `snipp.gg` for your domain by hand each time.
</Note>

## Using a Custom Domain in ShareX

If you upload through [ShareX](https://getsharex.com) (or [XerahS](https://xerahs.com) on macOS), you can already make your custom uploader return links on your own domain by editing the configuration file.

Open your `.sxcu` (or `.iscu`) file and change the `URL` field to:

```
https://example.com/{json:post.code}
```

Replace `example.com` with your custom domain. ShareX will copy the new URL format directly after every upload.

## Setup with Cloudflare

Cloudflare offers two ways to do this. Either works for a single-domain vanity setup. Pick whichever you are more familiar with.

### Option A: Bulk Redirects (Recommended)

[Bulk Redirects](https://developers.cloudflare.com/rules/url-forwarding/bulk-redirects/) are the newer, list-based equivalent. Free on every plan and not limited to 3 entries.

1. Go to your Cloudflare dashboard → **Bulk Redirects**.
2. Create a new list with a redirect rule:

| Field                | Value                  |
| -------------------- | ---------------------- |
| Source URL           | `https://example.com/` |
| Target URL           | `https://snipp.gg/p/`  |
| Status               | `301`                  |
| Preserve path suffix | Enabled                |

3. Attach the list to your zone.

### Option B: Page Rules

[Page Rules](https://developers.cloudflare.com/rules/page-rules/) are the simplest one-rule option. The Free plan includes 3 page rules per zone.

1. Go to your Cloudflare dashboard → **Rules** → **Page Rules**.
2. Create a new rule:

| Field           | Value                     |
| --------------- | ------------------------- |
| URL match       | `example.com/*`           |
| Setting         | **Forwarding URL**        |
| Status code     | `301 Permanent Redirect`  |
| Destination URL | `https://snipp.gg/p/${1}` |

3. Save and deploy.

<Note>
  Cloudflare is gradually migrating Page Rules to the newer Rules engine. Existing rules continue to work, but new setups may want Bulk Redirects for longevity.
</Note>

Either way, a visit to `example.com/[code]` will resolve to `snipp.gg/p/[code]`.

## Setup with Other Providers

Most DNS providers support URL forwarding with path preservation. Look for:

* **Namecheap:** Domain List → Manage → Redirect Domain (with "Path forwarding" enabled).
* **Porkbun:** URL Forwarding → enable "Include path".
* **GoDaddy:** Domain Settings → Forwarding → "Forward with masking" off, "Update my nameservers" off.

Configure forwarding from `https://example.com/` to `https://snipp.gg/p/` with path preservation enabled.

If your provider does not support path-preserving forwarding, point the domain at a small worker, redirect script, or static host that issues a `301` to `https://snipp.gg/p/{code}`.

<Warning>
  A redirect lives entirely on your domain's DNS. Snipp has no way to know which domain redirects to which post, and it cannot stop another person from configuring a redirect that targets the same Snipp link. Treat the custom domain as a vanity layer, not a security boundary.
</Warning>

Snipp does not offer hostname verification (TXT records, dashboard claims, etc.) for this feature. Even with verification, a third party could still point their own domain at the same `snipp.gg/p/[code]` URL. Verification would only confirm that you control your domain, not that you control who else can redirect to a public Snipp link. The end result is the same as the unverified setup, so the extra step would add friction without adding protection.
