Rewriter is the app responsible for managing VTEX IO routes related to the storefront. Through the use of the app's GraphQL API, it's possible to read, create and delete routes in a store.
The Rewriter app offers many features that can be configured on its Admin settings page, which are described in the next section. Some of these functionalities are:
- Redirecting routes with specific configurations (ending with
/, use of uppercase, etc.). - Configuring behavior when using
hreflangtags, which can be useful for multilanguage stores.
Settings
Follow the steps below to access the Rewriter settings page in your store:
- In the VTEX Admin, go to Apps > Extensions Hub > App Management.
- Search for Rewriter.
- In the Rewriter app's box, click ⚙ Settings.
- Edit the fields as needed.
- Click Save.
The table below describes the available settings of the Rewriter app:
| Name | Field type | Description |
|---|---|---|
| Enable 404 for paths with one segment | boolean | Enables 404 for paths with one segment. Make sure your search bar adds map=ft to your URL. For more details, see Enabling 404 pages for invalid single-segment paths. |
| Routes version | number | The version routes will be saved in. If this is changed, all routes saved in VBase will be invalidated, meaning all translated routes will be missing and the user will have to run the process to generate them manually. |
| Blocks default routes in other bindings | boolean | Blocks the default binding's routes in other bindings. |
| Enforce URLs in lowercase | boolean | Forces any URL containing uppercase characters to return a 301 redirect to the same URL in lowercase. Without this setting, search engines treat /Category and /category as distinct URLs, creating duplicate content that splits crawl budget and link equity. Enabling this consolidates signals into a single canonical URL. Note: This only affects requests to your VTEX storefront domain, not outgoing calls to third-party domains. |
| Enforce URLs without ending slash | boolean | Forces any URL ending with / to return a 301 redirect to the same URL without the trailing slash (for example, /category/ → /category).This setting eliminates duplication between /page and /page/, consolidating ranking signals into a single canonical URL, simplifies internal linking rules, and keeps sitemaps and redirects consistent. |
Remove repeated hreflang tags | boolean | Removes the repeated hreflang tags, prioritizing showing hreflang tags with the current host. |
Enable full locale in the hreflang | boolean | Includes the full locale in the hreflang. |
Remove locales with myvtex | boolean | Removes all hreflang tags on URLs that include myvtex. |
Custom hreflang | array | Associates your custom hreflang tags with the canonical address desired. |
| ↳ Canonical address | string | The canonical address of the hreflang tag to be modified. |
| ↳ Custom locale | string | The custom locale that will be used in the hreflang tag for the selected canonical address. |