Url Mapping Object


A custom URL pattern for one type of item page on a site, such as all Stores product pages.

A site has at most one URL mapping per key. When a site has no URL mapping for a key, the item pages use the key's default URL, which depends on the key. For example, Stores product pages default to <prefix>/{{slug}} and Blog category pages to <prefix>/categories/{{slug}}.

Properties
keystring

Type of item page this URL mapping applies to, and the variables its mapping must use:

  • wix.stores.sub_pages.product: Stores product page. Variables: slug.
  • wix.blog.sub_pages.post: Blog post page. Variables: slug.
  • wix.blog.sub_pages.category: Blog category page. Variables: slug.
  • wix.bookings.sub_pages.service_page: Bookings service page. Variables: slug.
  • wix.online_programs.sub_pages.online_program: Online Programs program page. Variables: slug.
  • wix.forum.sub_pages.category: Forum category page. Variables: slug.
  • wix.forum.sub_pages.post: Forum post page. Variables: categorySlug, postSlug.
  • wix.groups.sub_pages.group: Groups group page. Variables: groupId, tabName.

Other values aren't supported.


mappingstring

URL pattern for the item pages, relative to the site's base URL. Wrap variables in double curly braces, for example shoes/{{slug}}. The pattern must use every variable listed for its key, and no others. The pattern is saved in lowercase.

Rules: up to 1,000 characters; no spaces, emoji, or URL-reserved characters; no leading or trailing slash; no empty segments; at most one variable per segment. The resulting URLs can't collide with another page on the site or with another URL mapping.

Did this help?