Domains
When creating a new Serverless website, you will be prompted to set a domain/hostname for the website. This can be an apex domain (eg example.com), or a sub-domain (eg www.example.com).
You can add other sub-domains/domains to the website at any time, to enable access to the website from multiple domains.
The primary way to set up your domain is to set a CNAME record on the hostname you wish to use for accessing your website. You will need access to your DNS provider and the ability edit DNS records to make this change.
Using a Sub-Domain eg www.example.com
If you wish to have your site run on a sub-domain of your domain, such as www., you can set this when creating your site (or as an additional domain afterwards), then simply set the provided CNAME record with your DNS provider.
As sub-domains allow CNAME records to be set on them, no other action is required, nor recommended. Setting the CNAME is the only supported way to use a sub-domain for your website.
When configuring your DNS records it should look something like:
www.example.com » CNAME » bpkrsb6ovwxvkpnr.onwebslice.comUsing an Apex Domain eg example.com
When creating a Serverless website, you may want to use the apex of your domain as the hostname for the website. As CNAME records are not able to be set on an apex domain, you have a couple of alternative options.
If your DNS provider offers CNAME flattening for apex domains, you can use this feature to access your website via the apex domain. Services like Cloudflare perform this flattening automatically when a CNAME record is set as the apex domain record, but other services may require manual setup.
You can also use a DNS redirection service, to redirect requests to your apex domain to a sub-domain which has the correct CNAME record in place. This means users who visit your apex domain (e.g example.com) will be redirected to the correct sub-domain (e.g www.example.com) automatically.
Verifying Domains
After you have set the relevant DNS record for your domain, you will need to verify the domain in the Webslice console. This will check the DNS setup for the listed domain(s) and sub-domains, ensuring that they are pointing at the correct location.
Once verified, and once DNS has propagated, you will be able to visit your website via the domain(s) or sub-domains you have setup.
If the DNS records are removed or replaced, our systems will detect this and update the status of any domains no longer pointing at the correct location to unverified.