{"section":"tutorials","requestedLocale":"en","requestedSlug":"redirect-from-other-addresses","locale":"en","slug":"redirect-from-other-addresses","path":"docs/en/tutorials/infrastructure/cdn-service/redirect-from-other-addresses.md","branch":"main","content":"An online store must have a single main address [pointing to VTEX servers](/docs/tracks/pre-go-live) before the store is officially launched. Check the [Configuring the store domain](/docs/tutorials/configuring-the-store-domain) article to learn the rules the address must follow and the process for adding it.\n\nTo allow access to the store through other addresses and versions without a subdomain, you need to configure them to redirect to the main store address, which is listed in **Account settings > Account > Stores** in the VTEX Admin. See examples below:\n\n| Address                    | Type        |\n| -------------------------- | ----------- |\n| `www.mystore.com `         | Main domain |\n| `www.previousaddress.com ` | Redirect    |\n| `mystore.com `             | Redirect    |\n\n## Configuring redirects\n\nYou can configure redirects in different ways. One of the most popular ways is using `[htaccess](https://developer.mozilla.org/en-US/docs/Learn/Server-side/Apache_Configuration_htaccess)` on the server. You can also use a DNS redirect from many services, including domain providers such as [domain.com](https://domain.com/).\n\nFollow the instructions below to configure redirects to the main store address using the [Redirect-301](https://www.redirect-301.com/en/) tool, which is easy to use.\n\n> ⚠️ [Redirect-301](https://www.redirect-301.com/en/) is not a VTEX service and operates under a subscription model. While there are other similar solutions in the market, VTEX does not recommend any specific tool. VTEX is not liable for any issues arising from the use of external redirect services.\n\n### Address redirects without a subdomain (such as www)\n\nTo visit your store from an address without subdomains, such as `www`, you need to create a redirect to the main store address. For example, to access `http://www.mysite.com` using the address without a subdomain `http://mysite.com`, you need to create a redirect in your DNS provider by following the instructions below:\n\n1. Go to the [Redirect-301](https://www.redirect-301.com/en/) site and purchase a subscription. After your subscription is confirmed, you'll receive a token in your email. This token will be used in the domain configuration.\n2. Create an A record for the domain root, usually represented by `.`, `@`, or just `mysite.com`, pointing to `18.215.89.131` ([Redirect-301 IP](https://www.redirect-301.com/en/)).\n\n   |                                                                       |                         |                                                                                   |\n   | --------------------------------------------------------------------- | ----------------------- | --------------------------------------------------------------------------------- |\n   | Host Record: <leave-empty\\> | Type: A | To: 18.215.89.131 |\n3. Create a TXT record of type `redirect-301` (or `redirect-301.mysite.com`), with the following value: `token=YOUR_TOKEN;to=https://www.mysite.com/`\n\n|                                           |                           |                                                                                                                                         |\n| ----------------------------------------- | ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |\n| Host Record: redirect-301 | Type: TXT | Value: token=YOUR_TOKEN;to=https://www.mysite.com/ |\n\nLearn more about these cases in [Best practices for accessing the store without www](/docs/tutorials/best-practices-for-accessing-the-store-without-www).\n\nDepending on the DNS provider, redirect propagation may take a few minutes to complete.\n\n### Redirecting from one address to another\n\nFor example, to redirect from `www.previousdomain.com` to `www.newdomain.com`:\n\n- Create a `www` type A entry in the `previousdomain.com` domain pointing to `18.215.89.131` ([Redirect-301 IP](https://www.redirect-301.com/en/)).\n- Create a TXT record named redirect-301.www (or redirect-301.www.previousdomain.com) with the following value: token=YOUR_TOKEN;to=https://www.newdomain.com/\n\nTo redirect from `store.anyaddress.com` to `www.site.com`:\n\n- Create a `store` type A entry in the `anyaddress.com` domain pointing to `18.215.89.131` ([Redirect-301 IP](https://www.redirect-301.com/en/)).\n- Create a TXT record named `redirect-301.store` (or redirect-301.store.anyaddress.com) with the following value: token=YOUR_TOKEN;to=https://www.site.com/;\n\n### Redirecting access with HTTPS\n\nVTEX automatically directs `http://` addresses to `https://`. However, you may still need to redirect an `https://` address, such as a version of the address without a subdomain or one with a different domain, to an `https://` address.\n\nWhen accessing an HTTPS page, the server responding to the address must have an SSL certificate installed. Not having an SSL certificate means the browser will interpret the connection as not being secure and block the request. This prevents access to the desired page and makes it impossible to redirect to a different address.\n\nIn [Redirect-301](https://www.redirect-301.com/en/), an SSL certificate is installed for each pointed domain. This way, it will normally redirect accesses originating from HTTP and HTTPS, ensuring secure connections when applicable."}