Managing URLs

Every page on the web has what’s called a URL. The URL is the address people enter in their browser to visit a given web page. It is formed of a domain name followed by a path. The last portion of the path is referred to as the slug.

URL https://potion.so/guides/setup
Domain Name potion.so
Path /guides/setup
Slug setup

Hierarchical URLs

Potion generates URL paths that replicates the hierarchy of your pages inside Notion. For example, say you have a page describing your organisation. That Notion page is titled About Us and has a child page about your team in it whose title is Team. Potion will set the slugs of these pages to about-us and team respectively. Since the Team page is a child inside the About Us page, its URL path will inherit the slug of its parent and be set to /about-us/team.

As an example, we created a placeholder child page below. Notice how its URL includes the slug of the current page.

Setting a custom URL

You can customize the URL for your pages without leaving the Notion app by setting the potion:slug property to the desired URL slug.

Setting the full URL path of a page

You may not want that automatic parent/child hierarchy in page URLs but still want to keep the pages under a parent/child structure within Notion. In this case, just make sure you set a slug value for you page that starts with the / character. This makes it an absolute path and Potion will use that value without prefixing it with slugs of parent pages.

Furthering the example above, if that Team page under the About Us page had /team as the value of its potion:slug property instead of team, its URL path would be /team, not /about-us/team.

Fixing the URL slug value

While all links to that page within your site will automatically adjust to the new URL, links from external sites will not unless you let them know about it.

Ensuring unique URLs

While Notion allows you to create multiple pages with the same title, you can’t have two pages with the same URL. For that reason, Potion may add a numerical suffix to your slugs if it realizes the resulting URL will not be unique.

Special characters in URLs

A valid URL path should only contain ascii characters. If the title of your Notion page has accented or other non-ascii letters Potion will convert them into the closest ascii equivalent.

For example, a Notion page titled Mon voyage à Montréal will get mon-voyage-a-montreal as its slug value.