How to Create Pretty Urls

Learn how to create pretty urls for pages generated using records from Airtable.

Samantha Wong

Written by Samantha Wong

Pory now supports overriding default generated links which contains Airtable ids with your own pretty url. In this article, we will set up and sync pretty urls for your app to go

From: https://no-code-tools.pory.app/record/recAgPJudkWrYxmu5

To: https://no-code-tools.pory.app/pory

Before you sync, please note:

  • Pretty urls protected by permissions will not appear in site map.
  • Previously synced pretty urls will be overwritten.
  • Conflicting pretty urls will be deleted.

Create Pretty URL Field

First, let’s create a new field in your table to store the pretty URL for each record page

  1. Add a new Single Line Text field to your table e.g. Pretty Urls
  2. Enter a URL for each record e.g. /Pory
Create field for pretty url
Create field for pretty url

Create Pretty URLs with Formula

Most tables have hundreds if not thousands of records. We can use a formula to generate pretty URLs using a formula based on another field i.e. Product Title. This will lower case and hyphenate your field into a url.

Generate pretty url using a formula
Generate pretty url using a formula
  1. Add a new Formula field to your table e.g. Pretty URLs

  2. Copy and paste the formula below

    "/" & SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
    SUBSTITUTE(
      TRIM(LOWER({Field_Name})),
    "á", "a"),
    "à", "a"),
    "â", "a"),
    "å", "a"),
    "æ", "ae"),
    "ç", "c"),
    "è", "e"),
    "é", "e"),
    "ë", "e"),
    "ê", "e"),
    "î", "i"),
    "ï", "i"),
    "ì", "i"),
    "ñ", "n"),
    "ô", "o"),
    "ö", "o"),
    "ò", "o"),
    "ø", "o"),
    "õ", "o"),
    "ù", "u"),
    "û", "u"),
    "ü", "u"),
    "ý", "y"),
    " ", "-"),
    "!", "-"),
    ".", "-"),
    "/", "-"),
    "\"", "-"),
    "#", "-"),
    "$", "-"),
    "%", "-"),
    "&", "-"),
    "'", "-"),
    "(", ""),
    ")", ""),
    "*", "-"),
    "+", "-"),
    ",", "-"),
    ":", "-"),
    ";", "-"),
    "<", "-"),
    "=", "-"),
    ">", "-"),
    "?", "-"),
    "@", "-"),
    "[", ""),
    "\\", "-"),
    "]", ""),
    "^", "-"),
    "_", "-"),
    "`", "-"),
    "{", ""),
    "|", "-"),
    "}", ""),
    "~", ""),
    "«", ""),
    "»", ""),
    "€", ""),
    "„", ""),
    "“", ""),
    "-----", "-"),
    "-----", "-"),
    "----", "-"),
    "---", "-"),
    "--", ""),
    "—", "")
  3. Replace Field_Name with your own Airtable field.

Syncing URLs

Unfortunately, pretty URLs do not get periodically synced and regenerated on Pory yet. To sync pretty URLs and generate a sitemap.

  1. Go into the editor
  2. Click on Edit Listing
  3. Switch to the Detailed View
  4. Click on Pretty Url button
Pretty Url Settings
Pretty Url Settings
  1. Select your Pretty URL field
  2. Click Save and sync

Your record page should now use its pretty url.

Sitemap

Syncing pretty urls will also generate a sitemap for your portal. You can check it out by going to your-portal.pory.app/sitemap.xml.

Did this answer your question?