PagesPaths and slugs

Paths and slugs

A page's URL is derived from its place in the page tree: each item contributes one slug. This page covers what a slug may be, which URLs your code reserves, how a URL changes and how old addresses redirect.

View as Markdown

Three words

  • The URL is a page's full address within the site, /company/about-us. The pages list shows it in the URL column.
  • A path is an item in the tree that groups pages under a shared part of their URL, like company. It has no page of its own, so /company is a 404 until an editor gives it a page type with Add page here.
  • The slug is one item's own part, about-us. Editors set it when they create a page and change it with Rename….

In code, parameters named path such as the one renderSmoodlyPath() takes hold the URL path, and the page prop offers both page.path and page.url. Page types explains the difference.

What a slug may be

Lowercase letters, digits and single hyphens: about-us, 2026-report. Anything else is refused with a message, in the admin and in code. Two siblings cannot share a slug in the same language, and the admin says so when a second one is tried. The admin makes the slug from the title: ä becomes a, ø becomes o and ß becomes ss. A title in a script without Latin letters, such as Новости, makes no slug, and the admin asks you to type one.

A slug is per language. On a multilingual site each language has its own, so /company/about-us and /yritys/tietoa can be the same page. Locales and routing covers translated URLs.

When a URL changes

A URL is never stored; it is derived from the slugs of the page and its ancestors. Renaming a slug or moving a page changes the URL of the page and of everything below it, at once and everywhere the site links to it through Smoodly.

When the page is published, the admin asks before the change and offers Redirect the old address, ticked by default. Leave it ticked and every old address that was live, the page's and its published children's, keeps working: a visitor or a search engine who opens it is sent to the new address with a permanent redirect, so search ranking moves with the page. Untick it and the old addresses stop working. A draft's rename asks nothing and leaves nothing behind.

A redirect points at the page, not at its new address. Rename the page again and both old addresses go straight to the current one. Rename it back and the old address is simply live again. Create a new page at an address that redirects, and the new page wins: the redirect is replaced without a question.

The page's Settings tab lists the addresses that redirect to it under Redirects from.

Redirects

Settings › Redirects lists every redirect in the current language, with the address it sends visitors to, and lets any member remove one. Add redirect takes an old address by hand, for example the URLs of a site you replaced with Smoodly, and the page or entry it should go to. The target is always Smoodly content, picked from a list.

The old address is a site path in the current language, /old-products/widget. It needs a leading slash and no trailing slash, query string or hash. Its parts do not have to be slugs: capitals, dots and underscores are fine, because old sites had them, and matching is exact. Letters like ä and ö work too, typed or pasted from a browser's address bar as /s%C3%A4%C3%A4: both are the same address, and the list shows it the way you read it. The admin refuses an address a live page already owns, the admin's own address, and on a multilingual site an address with a file extension, because the language proxy never hands those to Smoodly.

Two things to know:

  • Browsers remember a permanent redirect. After you remove one, a visitor who followed it before may keep landing on the new address until their browser forgets it. Search engines pick up the removal on their next crawl.
  • Destinations outside Smoodly and addresses with a file extension or a query string belong in your app's own redirects, which run before any read of Smoodly:
// next.config.ts
export default {
  async redirects() {
    return [
      { source: "/about.html", destination: "/about", permanent: true },
      { source: "/shop/:path*", destination: "https://shop.example.com/:path*", permanent: true },
    ];
  },
};

A collection's path or a fixed page's slug that changes in code leaves no redirect either. The URLs move to the new address when the deploy goes live; add a line like the one above for the old ones.

URLs your code owns

Some segments are decided in code and checked when the config loads:

A fixed page's slugsmoodly.schema.page({ slug }): one page at that URL, in every language. Editors cannot rename it. It may have several parts, like about/team.
A collection's pathsmoodly.collection({ path }): its entries live under it, /posts/<slug>. Pages cannot be created under it. It may have several parts, like company/news.
homePageSlugdefineConfig({ homePageSlug }), default home: the page with that slug is served at /.
The admin's pathdefineConfig({ admin: { path } }), default /admin: reserved in every language, so no page can take it.

Two of these claiming the same address is an error at startup, not a surprise in production.

Your code owns each of these addresses whole. An editor cannot create, rename or move a page onto one or below one, except as a subpage of the fixed page itself; the admin refuses and names the owner: "/company/news" belongs to the News collection. The parts in between are not code's. An editor's /company page is an ordinary page, and when it is published its rename confirm says that /company/news stays where it is.

Nothing an editor made is ever taken over:

  • An editor's page already on the address stays in the pages list, but visitors get the code's page there, as an app/ route folder would beat it. The list shows a notice on it: rename or move it to give it a URL of its own. Its sections are never moved into the code's page.
  • A registration removed from code leaves its page behind, marked No longer in code in the pages list. It has no URL any more and can only be deleted.

Next, Drafts and publishing.

Edit this page on GitHubLast updated 29 Sep 2026