• Product

  • Solutions

  • Developers

  • Docs

  • Pricing

  • Cloud

Search icon
Strapi plugin logo for URL alias

URL alias

Unique, autogenerated URL paths.

Strapi URL alias plugin

Unique, flexible and autogenerated URL aliases for your Strapi managed web content.

NPM Version Monthly download on NPM CI build status codecov.io

This plugin is in ALPHA state

✨ Features

  • Unique URLs No duplicate URLs possible
  • Auto generated Automatically generated based on a pattern
  • Flexible Overwrite single URLs
  • Public endpoint Get your page by path with the /get endpoint
  • Auto slugify The URLs will automatically be slugified to ensure valid paths

✨ #StrapiPluginWeek

This plugin was made as an entry to the Strapi Plugin Week hackathon.

See the demo video.

⏳ Installation

Install the plugin in your Strapi project.

# using yarn
yarn add @strapi-community/strapi-plugin-url-alias

# using npm
npm install @strapi-community/strapi-plugin-url-alias --save

After successful installation you have to rebuild the admin UI so it'll include this plugin. To rebuild and restart Strapi run:

# using yarn
yarn build
yarn develop

# using npm
npm run build
npm run develop

Enjoy 🎉

🖐 Requirements

Complete installation requirements are the exact same as for Strapi itself and can be found in the Strapi documentation.

Supported Strapi versions:

  • Strapi 4.3.2 (recently tested)
  • Strapi ^4.x

(This plugin may work with older Strapi versions, but these are not tested nor officially supported at this time.)

We recommend always using the latest version of Strapi to start your new projects.

💡 Usage

This plugin extends the Strapi edit view to add a 'URL alias' sidebar. In the sidebar you are able to add a URL alias for your page.

You can either overwrite the URL, or have it be generated based on a URL pattern.

🔌 URL pattern

To create dynamic URLs this plugin uses URL patterns. The URL pattern will be used to generate unique URLs based on the data available.

You can add URL patterns in the settings section of the plugin.

1
/pages/[my-title-field]

Fields can be injected in the pattern by escaping them with [].

The following field types are allowed in a pattern:

  • id
  • uid
  • string

📺 Endpoint

The plugin also comes with an endpoint you can use to find any content by path.

REST

1
2
await fetch(`${API_URL}/api/url-alias/get?path=/about-page`);
// GET /api/url-alias/get?path=/about-page

🔗 Links

🌎 Community support

📝 Resources

Install now

npm install @strapi-community/strapi-plugin-url-alias

STATS

26 GitHub stars40 weekly downloads

Last updated

179 days ago

Strapi Version

4.0.0 and above

Author

github profile image for Boaz Poolman
Boaz Poolman

Useful links

Create your own plugin

Check out the available plugin resources that will help you to develop your plugin or provider and get it listed on the marketplace.