DNS configuration is an essential step for your store's go-live. On VTEX, a specific configuration of the DNS system (Domain Name System) is required for the store to operate properly. DNS is the system that translates domain names (such as mystore.com
) into IP addresses of servers that store the files needed to display a web page.
To configure DNS, you must create a CNAME for your store's main domain, directing it to {mainDomain}.cdn.vtex.com
. For example, for a store with the main domain www.mystore.com
, you should create a CNAME pointing to www.mystore.com.cdn.vtex.com
.
Redirects work in stages:
-
The CNAME created by your team routes the store traffic to a specific location within the VTEX infrastructure.
www.mystore.com
🠖CNAME
🠖www.mystore.com.cdn.vtex.com
-
Internally, VTEX configures a second CNAME that directs to the CloudFront service.
www.mystore.com.cdn.vtex.com
🠖CNAME
🠖xxxxxxxx.cloudfront.net
-
Finally, a type A redirect routes the CloudFront service to a specific IP address.
xxxxxxxx.cloudfront.net
🠖A
(record type containing an IP address) 🠖185.76.11.52
These settings ensure the resolved IP address is dynamic and can change anytime. This is because this IP address adapts to match the CDN (Content Delivery Network) server closest to the visitor's location. This adaptation improves the site's performance, as files are delivered from servers geographically closer to the visitor.
Learn more about DNS configuration on VTEX by reading the Go-live article.