๐Ÿ›  Updating Ghost Routes and Redirects: A Step-by-Step Upgrade Guide

Share
๐Ÿ›  Updating Ghost Routes and Redirects: A Step-by-Step Upgrade Guide

At NESTICT INFOTECH, weโ€™re continuously enhancing our digital systems to deliver structured, optimized, and reliable web experiences. One of our latest improvements involves upgrading our Ghost blog routing and permalink structure โ€” to make content URLs more organized, SEO-friendly, and consistent across all posts.


๐Ÿงญ Why Update Routes?

By default, Ghost uses simple post URLs like:

https://www.nestict.com/my-post/

While thatโ€™s clean, it doesnโ€™t reflect when the post was created or published.
To improve chronological navigation and SEO clarity, we implemented a date-based permalink format that includes the year, month, and day:

https://www.nestict.com/20251101/my-post/

This makes your content easier to organize, archive, and interpret by both readers and search engines.


โš™๏ธ Updating routes.json

We modified the Ghost routing configuration to include date tokens in the permalink.
The new structure is defined as follows:

{
  "routes": {},
  "collections": {
    "/": {
      "permalink": "/{year}{month}{day}/{slug}/",
      "template": ["index"]
    }
  },
  "taxonomies": {
    "tag": "/tag/{slug}/",
    "author": "/u/{slug}/"
  }
}

๐Ÿ” What This Does:

  • Uses {year}{month}{day} to automatically insert the publish date.
  • Keeps the {slug} for post readability.
  • Updates author URLs to a cleaner /u/{slug}/ format.
  • Maintains all tag pages under /tag/.

Once uploaded via Ghost Admin โ†’ Settings โ†’ Labs โ†’ Routes, Ghost will start applying the new URL pattern immediately.


๐Ÿ” Adding Redirects to Avoid 404s

Whenever URL structures change, itโ€™s critical to handle redirections properly to prevent broken links.
We prepared a redirects.json file to ensure that old links continue to work seamlessly.

Example:

[
  {
    "from": "^/author/(.*)/?$",
    "to": "/u/$1/",
    "permanent": true
  },
  {
    "from": "^/u/(.*)$",
    "to": "/u/$1/",
    "permanent": true
  },
  {
    "from": "^/writers/(.*)/?$",
    "to": "/u/$1/",
    "permanent": false
  },
  {
    "from": "^/users/(.*)/?$",
    "to": "/u/$1/",
    "permanent": false
  },
  {
    "from": "^/profile/(.*)/?$",
    "to": "/u/$1/",
    "permanent": false
  },
  {
    "from": "^/([^/]+)/?$",
    "to": "/:year:month:day/$1/",
    "permanent": true
  }
]

You can upload this file under:

Ghost Admin โ†’ Settings โ†’ Labs โ†’ Redirects โ†’ Upload redirects.json

Once uploaded, Ghost immediately activates the redirects, ensuring a smooth transition without affecting SEO.


๐Ÿงฉ Key Notes

  • Ghost supports {year}, {month}, {day}, {slug}, {primary_tag}, and {primary_author} in permalinks.
  • Tokens like {id} or {hour} are not supported natively.
  • For time-based (HHMM) or ID-style URLs, automation via n8n or custom API scripts can rename slugs dynamically during post publishing.

๐Ÿš€ Outcome

With this update:

  • All blog posts now follow a standardized, date-based permalink structure.
  • Older links remain functional via smart redirects.
  • The blog is more structured, readable, and SEO-compliant.

This ensures visitors always reach the right content โ€” and search engines better understand your publishing timeline.


๐Ÿ’ฌ Final Thoughts

Routing and redirection may sound technical, but theyโ€™re essential for a smooth reader experience and long-term SEO health.
At NESTICT INFOTECH, weโ€™re proud to implement these refinements across our platforms โ€” ensuring every click leads exactly where it should.


๐Ÿ“˜ Need help configuring your own Ghost routes or redirects?
Reach out to our technical team via support.nestict.com or drop us a message โ€” weโ€™ll be glad to assist.


Read more

Nestict Downloads Hub | KCSE, CBC Notes, Schemes of Work, Lesson Plans & School Resources

Nestict Downloads Hub | KCSE, CBC Notes, Schemes of Work, Lesson Plans & School Resources

Welcome to the official Nestict Downloads Hub. This thread provides a centralized index of all educational, academic, and professional resources available on www.nestict.com. Inside, youโ€™ll find: * ๐Ÿ“˜ CBC simplified notes for Grades 1โ€“9 * ๐Ÿ“‘ Schemes of Work (2025 & 2026) * ๐Ÿง‘โ€๐Ÿซ Lesson Plans and teaching resources * ๐ŸŽ“ KCSE, KPSEA &

By Nestict Infotech CSR