A URL mapping sets the URL pattern for one type of item page on a site, such as all Stores product pages or all Blog post pages. For example, the pattern shoes/{{slug}} gives a product with the slug red-shoes the URL /shoes/red-shoes.
With the URL Mapping API, you can:
Important: Changing or deleting a URL mapping on a published site changes the URLs of its item pages right away, and the old URLs stop working. The URL Mapping API doesn't create redirects. To keep old links and search rankings working, create 301 redirects from the old URLs to the new ones with Bulk Create Redirects in the SEO Redirects API.
A site has at most one URL mapping per key. Each key stands for one type of item page and sets the variables its pattern must use:
| Key | Page type | Variables | Default URL |
|---|---|---|---|
wix.stores.sub_pages.product | Stores product page | slug | <prefix>/{{slug}} |
wix.blog.sub_pages.post | Blog post page | slug | <prefix>/{{slug}} |
wix.blog.sub_pages.category | Blog category page | slug | <prefix>/categories/{{slug}} |
wix.bookings.sub_pages.service_page | Bookings service page | slug | <prefix>/service-page/{{slug}} |
wix.online_programs.sub_pages.online_program | Online Programs program page | slug | <prefix>/challenge-page/{{slug}} |
wix.forum.sub_pages.category | Forum category page | slug | <prefix>/{{slug}} |
wix.forum.sub_pages.post | Forum post page | categorySlug, postSlug | <prefix>/{{categorySlug}}/{{postSlug}} |
wix.groups.sub_pages.group | Groups group page | groupId, tabName | <prefix>/{{groupId}}/{{tabName}} |
When a site has no URL mapping for a key, its item pages use the default URL for that key, shown in the Supported item pages table. <prefix> is the URL of the page that shows the items. For example, when a store's product page has the URL product-page, its products default to product-page/{{slug}}. When the page's URL already matches a fixed segment, such as service-page, the segment isn't repeated.
In this case, Get URL Mapping returns an empty response rather than an error. Deleting a URL mapping returns the item pages to their default URL.
It's important to note the following points before starting to code:
key.wix.stores.sub_pages.product.mapping value. A path relative to the site's base URL, with variables in double curly braces, such as shoes/{{slug}}.slug.Last updated: 28 October 2026