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

# How to set a custom 404 redirect in ShortPen

> Set a custom 404 redirect in ShortPen so visitors who open a non-existing link on your domain are sent to a page you choose instead of an error page.

**Short answer:** Set a destination URL in your domain's settings so anyone who opens a link that **doesn't exist** on your domain (a wrong or expired slug, e.g., `go.yourbrand.com/typo`) is automatically sent to a page you choose instead of seeing an error page.

## What is a "custom 404 redirect"?

A **404** is the standard "page not found" response. On a connected [domain](/key-concepts/domains-overview), it happens when someone opens a slug that doesn't match any of your links, for example a mistyped, deleted, or expired short link.

A **custom 404 redirect** lets you decide where those visitors land instead of hitting a generic "link not found" page.

<Tip>
  **Example**

  A visitor opens `go.yourbrand.com/old-promo`, but that link no longer exists. With a 404 redirect set, they're sent to `https://yourbrand.com` (or any page you choose).
</Tip>

## Why set it?

Mistyped, deleted, and expired links are unavoidable. A 404 redirect avoids dead-ends: instead of an error page, visitors land on your homepage, a hub page, or a campaign page.

<Note>
  In ShortPen, this is an **optional** setting per connected domain. Your domain must be connected and [Active/verified](/domains/domain-verification) before you can edit its settings.

  If you don't set one, visitors who open a non-existing link see ShortPen's default "link not found" page.
</Note>

## How to set the custom 404 redirect: Steps

<Steps>
  <Step title="Open Domains">
    In ShortPen, go to **Settings → Organization → Domains**. (This is where connected domains are listed.)

    ***
  </Step>

  <Step title="Edit the domain">
    Click the domain you want to configure and choose **Edit**.

    ***
  </Step>

  <Step title="Enter the destination">
    In **404 redirect (optional)**, paste the **full URL** where visitors should land when they open a link that doesn't exist, e.g. `https://yourbrand.com` or `https://yourbrand.com/links`.

    ***
  </Step>

  <Step title="Confirm">
    Click **Confirm/Save**. Your change is live.

    Opening a **non-existing link** on this domain now redirects to the page you set.
  </Step>
</Steps>

<Tip>
  **Tip**: paste a complete URL including `https://` to avoid errors. Then open a private browser window and test by visiting your domain with a slug that doesn't exist.
</Tip>

## Root domain redirect vs. 404 redirect

These two settings cover different situations:

* **Root domain redirect** is used when someone visits your domain **without any slug** (e.g., `go.yourbrand.com`).
* **404 redirect** is used when someone opens a domain link **with a slug that doesn't exist** (e.g., `go.yourbrand.com/typo`).

<Info>
  **Learn more:** [How to set a root domain redirect](/domains/root-domain-redirect)
</Info>

## Related links

* [How custom domains work in ShortPen](/domains/why-use-custom-domain)
* [How to connect a custom domain to ShortPen](/domains/domain-connection)
* [How to verify your domain in ShortPen](/domains/domain-verification)
* [How to set a root domain redirect](/domains/root-domain-redirect)
