Managing Redirects in Ghost

If you haven't worked with Ghost before, we recommend starting with Running Ghost on Reclaim Cloud.

In the event that you accidentally publish a Ghost post with an incorrect URL slug, or you want to point a particular page on your site to another place, you may need to configure a redirect on your site. Luckily, Ghost makes it easy to configure those redirects.

To start, go into your Ghost admin dashboard, and then navigate to Settings. You can find the Settings page by using the gear icon at the bottom of the left-hand navigation pane:

Ghost_Dashboard_Find-Settings.png

Inside Settings, click the the Labs section:

Ghost_Settings_Find-Labs.png

Inside Labs, there's a section called Beta Features, which contains a feature called Redirects. Use the Download current redirects button in order to download a YAML file containing all the currently existing redirects. Alternatively, if you haven't configured any redirects yet, you can create a new file called redirects.yaml.

Ghost_Settings_Find-Download_Redirects.png

Inside redirects.yaml, your file will start with the line 301:. Each line after that will list the URL slug that you want to redirect, followed by the slug for the page you want it to redirect to. For example, imagine that you published a post with a particular URL slug, and then later decided to go back and change it. You can now point the old URL slug to the new location, and it will look something like this:

301:
/post-slug-that-needs-changing: /new-post-slug

Based on the above example, if the full URL is myghost.site/url-slug-that-needs-changing, now visitors going to that page will be redirected to myghost.site/new-url-slug instead.

Say that after that, you decide that you also want to point the slug for a particular page to a different page. You would add another line with the next redirect, but wouldn't repeat the 301:. The end result will look like this:

301:
/post-slug-that-needs-changing: /new-post-slug
/page-slug-to-point-elsewhere: /elsewhere

Once you have everything configured the way you want it, you can return to the Redirects section and use click the Upload redirects YAML/JSON button to upload your file.

If in the future you decide you want to add more redirects or change the ones you already have in place, the process is the same: you can download that file again, edit it how you want, and re-upload it.

If you are looking for more info on Ghost's redirects, we'd recommend checking out their official documentation here:

Implementing Redirects in Ghost

Was this article helpful?
0 out of 0 found this helpful

Articles in this section

See more
Reclaim Hosting Support Hours
8:00 am - 5:00 pm ET, Monday through Friday
Submit a Ticket
Get a quick and helpful response from the pros.
Need Extra Support?
No problem, we're here to help! Talk to us about Professional Services or custom Service Level Agreements.