Tailwind Logo

Vercel configuration points after XM Cloud deployment

XM CloudVercel

Published: 2023-12-13

We have introduced the procedure for extracting to Vercel. This time, we will introduce some settings after the deployment, and we will also discuss the differences depending on the edition.

Domain Name Settings

By default, deployment is done to the .vercel.app domain, but you can specify a separate domain to change access to the project site. Enter the new domain in the project's Settings - Domains and you will see the following

verceldeploy01.png

Register the above records as DNS records for your domain. The next step in setting up this TXT is to view the CNAME records, and once they are reflected, SSL will be automatically generated. Basically, the certificate will be generated automatically.

The Enterprise Edition can also be configured to bring in a certificate.

Production Branches

By default, the main branch is treated as production. This setting is found in settings - git, which includes the following items

verceldeploy02.png

If you are using other branch names, you can change this setting to switch production branches. When adding a domain, changing the branch to be linked will automatically set it as a preview.

verceldeploy03.png

Protecting the Preview Branch

For non-production sites, you can protect them so that only the user logged into Vercel can access them. This is done by turning on Vercel Authentication in the Deployment Protection section of the project settings. There are three modes for this.

verceldeploy04.png
  • Standard Protection - Only domains set up as production environments can be accessed
  • All Deployments - All require authentication
  • Only Preview Deployments - All Deployments set as Preview require authentication.

In the case of Sitecore XM Cloud, when using Standard Protection, there are some resources that cannot be referenced, such as CSS. This is because authentication is required for the data you build. The following is a sample configuration.

verceldeploy05.png

When I changed the setting to Only Preview Deployments, I was able to load the data correctly.

verceldeploy06.png

The solution to the above problem will be introduced separately in the next issue.

Security Settings

In addition to the above items, the following items can be selected for Enterprise.

  • Trusted IP address
  • Password Protection
  • Domains excluded from protection with respect to deployment

Summary

The above basic aspects of actual operation and security are covered for websites that serve as delivery servers. This allows you to reduce the man-hours required for server maintenance and operation.

Tags