# 404 Handling

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="/files/7u1Pea6IYDKiJati2WTo" 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;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://domainmappingsystem.gitbook.io/domainmappingsystem-docs/features/404-handling.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
