> ## Content Index
> Fetch the complete content index at: https://ghost.org/help/llms.txt
> Use this file to discover other available public pages before exploring further.

# Redirects
- URL: https://ghost.org/help/redirects/
- Published: 2023-04-20T14:34:55.000Z
- Updated: 2024-11-11T11:30:08.000Z
- Author: Ghost
- Tags: Advanced settings, Manual

Ghost includes support for implementing URL redirects through the use of a custom `redirects.yaml` file. 

Redirects can be useful for:

- **Changing your site URL structure** – If you're reorganizing your site's content, or updating your permalink structure, you may need to set up redirects to ensure that any links pointing to old URLs are automatically redirected to the correct *new* URL. This can help preserve your site's SEO, and ensure that readers are able to find the content they're looking for.
- **Updating or removing content** – If you have content on your site that is outdated or no longer relevant, you may want to remove it or replace it with new content. In this case, you can set up a redirect to automatically send readers to a new page or post that is related to the old content.
- **Fixing broken links** – If you have links on your site that are broken, or no longer work, you can set up a redirect to automatically send readers to a working page or post that is related to the broken link.

Ghost supports `301` and `302` redirects. `301` redirects are for permanent redirects, and `302` redirects are for temporary redirects.

To implement redirects, go to the **Settings → Advanced → Labs** area of Ghost Admin. **Open** the Labs area using the **Open/Close** toggle, and select the **Beta features** tab.

![The beta tab, in Ghost's labs settings area](https://storage.ghost.io/c/69/0f/690faecc-18d1-42c5-a99a-83ce5fada384/content/images/2023/10/Labs-Beta-features-in-Ghost.png)

Download your existing `redirects.yaml` file. 

![The redirects options in Ghost's labs settings](https://storage.ghost.io/c/69/0f/690faecc-18d1-42c5-a99a-83ce5fada384/content/images/2023/10/redirects2-1.png)

Once downloaded, open the file in a code editor to add custom redirect rules to the file in YAML format. Be sure to use **spaces** and not tabs to indent rules.

For example:

```
301:
  /permanent-redirect-from: /permanent-redirect-to
  /permanent-redirect-from-2: /permanent-redirect-to-2

302:
  /temporary-redirect-from: /temporary-redirect-to
  
```

Upload your edited file in the labs area.

![The upload redirects file button in Ghost's labs settings](https://storage.ghost.io/c/69/0f/690faecc-18d1-42c5-a99a-83ce5fada384/content/images/2023/10/redirects3-1.png)

For additional information on setting up redirects in Ghost, check out our [Implementing Redirects](https://ghost.org/tutorials/implementing-redirects/#implementing-redirects-in-ghost) tutorial.