{"section":"tutorials","requestedLocale":"en","requestedSlug":"url-mapping-301-redirect","locale":"en","slug":"url-mapping-301-redirect","path":"docs/en/tutorials/storefront/layout/url-mapping-301-redirect.md","branch":"main","content":"> ⚠️ This tutorial is for stores using Legacy CMS Portal. For other stores, the configuration is made in [Pages](/en/docs/tutorials/pages-overview). Please refer to [Managing URL redirects](/en/docs/tutorials/managing-url-redirects) for more information.\n\nURL mapping is used to redirect specific URLs to other URLs. This feature is useful when a store already has URLs indexed in search engines and wants to redirect them to more attractive ones without changing the SEO and avoiding indexing errors.\n\nAll mapping activities recorded will be executed according to 301 redirects. The 301 redirect, also known as “permanent redirect,” transfers all key data from the original URL (**Page Rank**, **Link Popularity**, etc.) to the new URL.\n\nThere are two ways to add and change URL mapping:\n\n- [Manually](#manually)\n- [Via spreadsheet](#via-spreadsheet)\n\n## Manually\n\n1. In the VTEX Admin, access **Storefront > Layout**\n2. Click on the **CMS** folder to open the directory.\n3. Click on the **URL Builder** folder.\n\n4. Click on the `Add` button to add a new mapping or the `Update` button to edit an existing one.\n5. Fill in the [URL Builder fields](#url-builder-fields).\n6. Save by clicking on `Save URL`.\n\n### URL Builder fields\n\n- **Url from:** URL that will be redirected. This URL must not contain the domain. Required field.\n- **Url to:** URL to which the navigation will be redirected. This URL must not contain the domain. Required field.\n- **Start date:** date and time when the mapping will start to be considered. Required field.\n- **Start date:** date and time when the mapping will no longer be considered.\n- **Active:** indicates if the mapping option is active or inactive.\n\n> ℹ️ To map a URL to home (root directory), fill in the **Url to** field with a slash `/`.\n\n## Via spreadsheet\n\n1. In the VTEX Admin, access **Storefront > Layout**\n2. Click on the **CMS** folder to open the directory.\n3. Click on the **URL Builder** folder.\n4. Click on `Import` to import the spreadsheet.\n5. Download the spreadsheet template illustrated below by clicking on `Export`.\n![exemplo-planilha](https://cdn.statically.io/gh/vtexdocs/help-center-content/refs/heads/main/docs/en/tutorials/storefront/layout/url-mapping-301-redirect_1.png)\n6. Fill in the [spreadsheet fields](#spreadsheet-fields).\n7. After populating the spreadsheet template, click on the `Localize` button on the import page to upload the template.\n8. Select the file you want to upload. The filename extension must be `.xls` in the format `Excel 97-2003 Workbook`.\n9. Click on the `Save file` button to finish. A message will be displayed informing the number of URLs added.\n\n### Spreadsheet fields\n\n- **Url from:** URL that will be redirected. This URL must not contain the store’s domain. Example: `/path_on_my_old_website.html`.\n- **Url to:** URL to which the navigation will be redirected. This URL must not contain the store’s domain. Example: `/path_on_my_old_website.html`.\n- **Active:** indicates if the mapping option is active or inactive. Set `1` to enable and `0` to disable.\n- **Start date:** date when the mapping will start to be considered. The date format must be `dd/mm/yyyy`.\n- **End date:** date when the mapping will no longer be considered. The date format must be `dd/mm/yyyy`."}