CMS: Creating Unique Dynamic Page URLs

8 min read
The URL slug is the part of your dynamic page's web address that identifies a specific page. It is the text in the URL that comes after the domain name and helps humans and search engines know what the content is about.
Ensure that each item from your collection gets a unique web address by adding variables to the URL slug structure. The variables you add to the URLs are replaced by the actual field values from your collection items. You can also edit specific dynamic item page URLs and set up automatic redirects for the old URLs. 
A screenshot of the URL slug structure in the SEO tab of page settings.

About URL slug structures

The part of your dynamic page's web address that identifies a specific page is known as the URL slug structure. It helps both people and search engines understand what the page's content is about. 

By default, your dynamic page URLs have the following slug structure: 
  • Dynamic list pages: https://www.{your-domain.com}/{collection-name}
  • Dynamic item pages: https://www.{your-domain.com}/{collection-name}/{primary-field}

Dynamic page URLs are automatically created based on the first value entered in the collection's primary field. Once created, you can manually change the URL slugs from your collection's Page Link fields that display them. If needed, you can create a URL redirect that sends visitors and search engines to the new dynamic page URL in case they visit the old link.

In your collection, you can view and edit the slug structures in the Page Link fields titled: 
  • Dynamic list pages: {Collection name} (List)
  • Dynamic item pages: {Collection name} (Item)

Next to your field names, a Flag icon indicates it is the primary field and the word SLUG indicates the field is used as a URL slug variable. Since your primary field appears in your dynamic item pages' default URL slug structure, each value in the field should be different.
A screenshot showing the primary field, another field used in the slug structure, and the Page Link fields that show the URL.

Why you should add variables to dynamic page URLs

You may need to add fields to dynamic page URLs to create unique URLs for each item in your collection. If multiple items in your collection have the same value in their primary field (e.g. "Title" or "Name"), and you do not add a variable to the dynamic URL, only 1 URL is generated. This is because the primary field is used in the URL by default. Since only 1 URL is created for both items, only 1 item will have a dynamic page, the other will not. 

To solve this issue, add variable fields to the URL so each item gets its own dynamic page with a unique URL. 
Example:
If your dynamic item page URL ends with /team/{Title}, and 2 items in the collection have "Sara" in the primary Title field, only 1 URL is generated for /team/sara. So only 1 dynamic page is created for 1 of the 2 items in the collection. 

To solve this, you could add a field to the URL that is unique to each item. For example, add a "Phone" field if each item has a different value in a "Phone" field. The URL would then be /team/sara/{Phone} so each item gets its own unique dynamic page URL.

Adding variables to dynamic page URL slug structures

Go to the SEO tab of your dynamic page settings in your editor to check your URL slug structure. You can then manually edit the structure and add variable fields that change based on each collection item's actual field value. 
Important:
If you change the URL slug structure of your dynamic pages, all the existing links to these pages will no longer work. This affects links within your site, any links you've shared externally, and SEO links in search engines. 
Wix Editor
Editor X
Studio Editor
  1. Go to your editor.
  2. Click Pages & Menuon the left side of the editor.
  3. Click Dynamic Pages
  4. Hover over the relevant dynamic page and click the More Actions icon  on the right. 
  5. Click SEO
  6. Click the URL slug structure field.
  7. (Optional) Enter text or number values to modify the URL slug structure. You can enter characters in the URL prefix that appears after https://www.../ and on either side of a variable. 
  8. Click Add Variable and select the field from your collection that you want to use in the URL.
    Note: You can only use Text and Number fields from your collection as variables. 

Editing URL slugs for specific dynamic item pages

From your collection, you can customize the end of the URL used by specific dynamic item pages. When you change the URL slug, the old links no longer work. However, you can easily add an automatic redirect that takes visitors and search engines from the old URL to the new one. 
Important:
We're working on releasing this feature, which is not yet released in all Wix accounts.

To edit an item's URL slug:

  1. Go to CMS in your site's dashboard. Alternatively, you can click CMS  in your editor, then click Your Collections
  2. Click the relevant collection.
  3. Click the Page Link field for the relevant item titled: {Collection name} (Item)
A screenshot of clicking a Page Link field for an item's dynamic page.
  1. Click the URL Slug field and edit the URL. 
  2. Click the toggle to choose whether to redirect the old URL to the new one: 
    • Enabled: (Recommended) Visitors and search engines that go to the old URL are automatically redirected to the new one. 
    • Disabled: Visitors and search engines that go to the old URL will see a 404 error page
  3. Click Save
A screenshot of editing a dynamic item page's URL slug.

FAQs

Click a question below to learn more about creating unique dynamic page URLs.

Did this help?

|