> For the complete documentation index, see [llms.txt](https://salsa-digital.gitbook.io/govcms-site-builder/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://salsa-digital.gitbook.io/govcms-site-builder/unit-7-url-aliases/url-redirects.md).

# URL Redirects

URL Aliases are generally the best URL for site visitors to use. However, sometimes site visitors may need an alternative URL. This may be because an incorrect URL was published in print or on another website or because you want to create a shorter URL for a marketing campaign.

Redirects are also created by GovCMS to make sure only one (usually the latest) URL alias is functional and to ensure previously created URL aliases do not return “404 Not Found” response.

![Image of Redirects forwarding to latest Alias](https://3186608908-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LzAsrTcKaHnLDg-7ALW%2Fuploads%2Fgit-blob-a4d4397fc19f06272411d0fddb581cdf399909f8%2F155%20\(1\)%20\(1\)%20\(2\).png?alt=media)

*Illustration of how Redirects are forwarding all traffic to the latest Alias*

{% hint style="info" %}
**Tip:** Redirects are generally a better option because extra URL aliases can mean you end up with duplicate content issues, which has a negative impact on SEO.
{% endhint %}

Out-of-the-box, GovCMS sites may not handle redirects the way your client would expect. Navigate to the *Configuration* → *Search and metadata* → **URL Aliases** then go to the **Settings** tab and explore how the update action of URL aliases is handled.

![Image of URL Alias settings](https://3186608908-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LzAsrTcKaHnLDg-7ALW%2Fuploads%2Fgit-blob-4879da9e63621ea71b152fece6cbe3c16845f96e%2FUnit-7-URL-Redirects-2.png?alt=media)

In this default configuration the old alias will be deleted. This may not be the best way to handle changes of URL aliases in content.

A better way to handle URL aliases is to create a redirect automatically when an URL alias is getting updated. This will ensure that links to content stay valid whenever the URL alias of a content page is changed.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://salsa-digital.gitbook.io/govcms-site-builder/unit-7-url-aliases/url-redirects.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
