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

# Ghost Redirects Error on Upload
- URL: https://chrisenns.com/2024/04/ghost-cannot-fetch-redirects-error/
- Published: 2024-04-18T15:54:29.000Z
- Updated: 2024-04-18T15:54:29.000Z
- Description: I banged my head against the virtual wall for a week trying to figure this one out. Turns out it's a very simple fix.
- Author: Chris Enns
- Tags: Ghost, CMS

⚠️

TLDR: Rename the redirects filename extension to `.yaml` instead of `.json` before you upload the Redirects or Routes file back to Ghost.

If you use [Ghost](https://ghost.org/?ref=chrisenns.com) and want to redirect visitors to your website to a different post, page, or file you have to use the `Redirects` option in the Settings menu. There's a support page for [Redirects](https://ghost.org/help/redirects/?ref=chrisenns.com#:~:text=Ghost%20supports%20301%20and%20302,select%20the%20Beta%20features%20tab.) that walks through all the options.

![Screenshot of the Settings menu in Ghost CMS with arrows pointing at the Redirects and Routes area of the menu.](https://storage.ghost.io/c/67/50/6750cf9b-787e-4b61-ae0a-04a8492a2ece/content/images/2024/04/CleanShot-2024-04-18-at-09.32.38@2x.png)

Redirects and Routes in Ghost's settings menu

But one thing confused me is when I downloaded the current Routes file is that it saved the file to my Mac as `redirects.json`. 

![Finder view of redirects.json file naming as downloaded.](https://storage.ghost.io/c/67/50/6750cf9b-787e-4b61-ae0a-04a8492a2ece/content/images/2024/04/CleanShot-2024-04-18-at-09.42.17@2x.png)

Finder view of redirects.json file naming as downloaded.

I opened the redirects file in VS Code, made my changes, saved it, and then tried to upload my changes back to Ghost and got this error message at the top of the screen:

![Screenshot of , cannot fetch redirects error message at the top of Ghost CMS](https://storage.ghost.io/c/67/50/6750cf9b-787e-4b61-ae0a-04a8492a2ece/content/images/2024/04/CleanShot-2024-04-17-at-09.54.51@2x.png)

, cannot fetch redirects error message

`, cannot fetch redirects` isn't that helpful as an error message. I assumed it had something to do with caching at the DNS or domain level and so I waited. Except when I tried again a few days later, it was still giving me that error.

I eventually gave up and contacted their support and while they were helpful, their tone kind of implied I was doing something wrong in renaming it to .JSON:

> When reviewing the file, I see you have this composed in YAML, though the file is saved as a `.json` file, instead of `redirects.yaml` .   
>  
> Would you be able to try the attached `redirects.yaml` file, to confirm whether you have success?

When I renamed the file to `redirects.yaml` it uploaded fine and my RSS feed was now redirecting properly from what I used to have it at to the new Ghost format. 🎉

## All Good in the End

This may be obvious to some developers, but it wasn't to me. So I'm archiving it here and when I google the error message again in 6 months and find my own post with the answer, I can high five myself.

OR Ghost could just download the file with a `.yaml` extension and save users and potentially support emails? I think it's a holdover from when Ghost used to use `.json` files for settings and configuration so might just be a corner of the code that needs to be updated.

But that's not for me to know or understand. That's why I pay for blog + website hosting instead of having to update plugins and code myself. 😆