{"section":"tutorials","requestedLocale":"en","requestedSlug":"url-mapping-301-redirect","locale":"en","slug":"url-mapping-301-redirect","path":"docs/en/tutorials/storefront/cms-portal-legacy/layout/url-mapping-301-redirect.md","branch":"main","content":"> ⚠️ This tutorial is for stores using CMS Portal (Legacy). For other stores, you can configure this in [Pages](/en/docs/tutorials/pages-overview). See [Managing URL redirects](/en/docs/tutorials/managing-url-redirects) for more information.\n\nURL mapping is used to redirect specific URLs to other URLs. Use this feature when your store already has URLs indexed by search engines and you want to redirect them to more attractive ones, preserving 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 (PageRank, link popularity) to the new URL.\n\nThere are two ways to add or edit a URL mapping:\n\n- [Adding or editing manually](#adding-or-editing-manually)\n- [Importing via spreadsheet](#importing-via-spreadsheet)\n\nTo remove existing mappings, see the [Deleting mapped URLs](#deleting-mapped-urls) section.\n\n## Adding or editing manually\n\nTo add or edit a mapping manually, follow these steps:\n\n1. In the VTEX Admin, go to **Storefront > Layout**.\n2. Click the **CMS** folder to open the directory.\n3. Click the **URL Builder** folder.\n4. Click the `Add` button to add a new mapping or the `Update` button to edit an existing one.\n5. Complete the [URL Builder fields](#url-builder-fields).\n6. Save by clicking `Save URL`.\n\n### URL Builder fields\n\n- **Url from:** URL that will be redirected. This URL must not contain the store domain. Required field.\n- **Url to:** URL to which the navigation will be redirected. This URL must not contain the store domain. Required field.\n- **Start date:** Date and time when the mapping will start to be considered. Required field.\n- **End date:** Date and time when the mapping will no longer be considered.\n- **Active:** Indicates if the mapping is active or inactive.\n\n> ℹ️ To create a mapping for the home page (root directory), complete the **Url to** field with a slash `/`.\n\n## Importing via spreadsheet\n\nTo import mappings via spreadsheet, follow these steps:\n\n1. In the VTEX Admin, go to **Storefront > Layout**.\n2. Click the **CMS** folder to open the directory.\n3. Click the **URL Builder** folder.\n4. Click `Import` to import the spreadsheet.\n5. Download the spreadsheet template illustrated below by clicking the `Click here` button.\n\n   ![spreadsheet-example](https://cdn.statically.io/gh/vtexdocs/help-center-content/refs/heads/main/docs/en/tutorials/storefront/cms-portal-legacy/layout/url-mapping-301-redirect_1.png)\n\n6. Complete the [spreadsheet fields](#spreadsheet-fields).\n7. After completing the spreadsheet, click the `Browse for file` button on the import screen.\n8. Select the file to import from your computer. The file must have the `.xls` extension and `Excel 97-2003 Workbook` format.\n9. Click the `Save file` button to finish. After saving, a message will display 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 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 domain. Example: `/path_on_my_new_website.html`.\n- **Active:** Indicates if the mapping is active or inactive. Set `1` to activate and `0` to deactivate.\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`.\n- **Remove:** Option to delete the mapping. Enter the value `1` to delete the URL.\n\n## Deleting mapped URLs\n\nTo delete existing mappings, you can do it [manually](#deleting-manually) or [via spreadsheet](#deleting-via-spreadsheet).\n\n### Deleting manually\n\nTo delete URLs manually, follow these steps:\n\n1. In the VTEX Admin, go to **Storefront > Layout**.\n2. Click the **CMS** folder to open the directory.\n3. Click the **URL Builder** folder.\n4. Select the mapping row you want to delete.\n5. In the top menu of URL Builder, click `Delete`.\n\n### Deleting via spreadsheet\n\nTo delete URLs via spreadsheet, follow these steps:\n\n1. In the VTEX Admin, go to **Storefront > Layout**.\n2. Click the **CMS** folder to open the directory.\n3. Click the **URL Builder** folder.\n4. In the top menu, click the `Export` button to download a spreadsheet containing the previously registered URLs.\n5. In the **Remove** column, enter the value `1` for the rows you want to delete.\n6. Import the spreadsheet in URL Builder, following the steps in the [Importing via spreadsheet](#importing-via-spreadsheet) section."}