🛠 Updating Ghost Routes and Redirects: A Step-by-Step Upgrade Guide

🛠 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

Matomo (formerly Piwik) is often considered the best open-source alternative to Google Analytics + Search Console for several reasons. Here's a breakdown of why Matomo stands out

Matomo (formerly Piwik) is often considered the best open-source alternative to Google Analytics + Search Console for several reasons. Here's a breakdown of why Matomo stands out

1. Privacy & Data Ownership * Matomo: You own 100% of the data. It's stored on your server (if self-hosted), and no third party (like Google) can access it. * Google Analytics/Search Console: Google owns the data, and it can use it for its own purposes (ads, benchmarking, etc.

By Nestict Infotech CSR