URL Aliases and Adding categories to the menu
In this help article we will cover what is a URL alias and how you can use one on your website.
How it works:
As you might already know, here on SpreadSimple, URLs keep the filter, search, and sorting states that allows getting and sharing links to a certain category of items. Such URL looks like this: https://my-directory.spread.name/?filter=Category-%3AAccessory
But by setting an alias for that URL, you can make it look like more user-friendly like this: https://my-directory.spread.name/accessory. And such link will be more SEO-friendly as well.
How to create URL aliases and add categories to the navigation menu:
On your published website, filter your items by a certain category and copy that link.
In your website editor go to the Pages&links Tab, and create a new link.
In the New link settings menu, paste the part of URL with filter state (category) /?filter=Category-%3AAccessory to the URL field and fill the remaining fields. Add the menu item title (this is how your link will appear in the navigation menu) and set URL Alias, for example, accessory.
Make sure that you’re using a unique alias (that isn’t used for any other pages or links) to avoid any possible route conflicts.
Make sure your header is enabled (Design Tab -> Header). You won’t be able to add links to the navigation menu in case your header is off.
Save the changes.
Now, on your published website, you can see a new link in the navigation menu.
And by clicking on the link, your website visitor will be able to see a certain category of items (already filtered catalog). And there will be a nice and clean URL like https://my-directory.spread.name/accessory that you can copy and share to your users.
Please note that you can set link aliases only for your main page URLs with filter, search or sorting states (categories of your items). It is not possible to create aliases for content pages or details pages. And an alias can work only for internal URLs.
When we change the state in the URL (for example, we select a different criterion for sorting or start searching), the URL will be back to the default.
But we’ll see the URL with the alias again as soon as we recreate the state (for example, click again on the category link or remove the search input, and so on).
And a page with an alias will have the canonical tag (aka "rel canonical") telling the search engines that this alias route represents the master copy of a filtered state.
Updated on: 16/11/2021