Reset Routes and Redirects

Hi all, I made some changes in the Routes- and Redirects-files and now I want reset it to the standard-setup. But now there are 404-errors at the homepage, the blog-overview-page and blog posts. How I can delete my changes and go back to the standard? Thanks!

Make sure that the URLs you are trying to access match the structure defined in the routes and redirects files. That is, if you had set up custom paths and now you have reset the routes and redirects files, you need to fix those paths too.

If you’re still experiencing errors, ensure that you run up-to-date Ghost version and clear your browser cache.

The default routes.yaml is listed here:

## routes.yaml

routes:

collections:
  /:
    permalink: /{slug}/
    template: index

taxonomies:
  tag: /tag/{slug}/
  author: /author/{slug}/

And the default redirects.json is []

Thank you. I found the mistake. The routes.yaml was empty by uploading with my iPad. I tried with my Mac and now the homepage is as before. But one question for the blog: Isn’t the URL for the blog-section not “/blog”? There is still the 404-error. But I don’t remember, if this is the structure of Ghost or if the blog-overview by default only at the homepage.

Not by default, although you might have been using a theme that came with a routes file.

1 Like