> For the complete documentation index, see [llms.txt](https://domainmappingsystem.gitbook.io/domainmappingsystem-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://domainmappingsystem.gitbook.io/domainmappingsystem-docs/features/404-handling.md).

# 404 Handling

This page explains how unmapped pages can be handled with a 404 error.

What should happen when users visit an alias domain on your site, but the URL doesn't match any of the content attached to the alias domain?&#x20;

We've added a 404 Handling mechanism that can be enabled by activating the *404 Handling* checkbox:

<figure><img src="https://1402200364-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MdK4RkxW1x8s0Z8rF9f%2Fuploads%2FjG7LZQIkxQywavgtt9UI%2F404-handling.png?alt=media&amp;token=e58f2603-7cdf-4352-af64-cf0f75af452e" alt=""><figcaption><p>404 Handling Checkbox</p></figcaption></figure>

There are two possibilities when enabling the 404 handling mechanism:

* **Throw 404 Error** - You can throw a standard 404 error, as if the page is simply missing. This keeps the experience similar to a standalone website.
* **Redirect to microsite homepage** - This means that the site visitor will be redirected to the alias domain homepage, configured in the domain mapping settings. See [*Creating Microsites*](https://docs.domainmappingsystem.com/features/creating-microsites-multisite-alternative) for more information about how to set the microsite homepage. This functionality replaces the need for a "404 Redirect to Homepage" type of plugin.&#x20;
