The trailing dot at the end of the target endpoint (pipeline-id-or-bucket-name.svc.edge.scw.cloud.
) is implicitly added by some domain and DNS providers, and must be explicitly added for others. Check with yours whether the dot is necessary.
CNAME records and DNS for Edge Services
This document contains information to help you successfully create a CNAME record for your customized Edge Services domain, and troubleshoot any potential DNS problems.
What is a CNAME record?
A Canonical Name (CNAME) record is a type of DNS record. Generally, DNS records hold information for translating a domain or subdomain to an IP address, mail server or other domain/subdomain. They are crucial in directing internet traffic to the correct servers. More specifically, CNAME records map one domain name (an alias) to another (the canonical name).
A CNAME record may look like the following:
Hostname / Alias | Destination / Canonical Name |
---|---|
videos.example.com | otherdomain.com |
In this case, when a DNS server sees this record for videos.example.com
it will know not to direct traffic to videos.example.com
’s own IP address, but to that of otherdomain.com
. It will find othercomain.com
’s IP address via its A record.
When the client actually connects to otherdomain.com
’s IP address, the web server can see that the requested URL was videos.example.com
, and deliver the relevant content.
When and why do I need to create a CNAME record for Edge Services?
When you create an Edge Services pipeline to an origin (Object Storage bucket or Load Balancer), initially the origin content is served through the standard Edge Services endpoint, e.g. pipeline-id-or-bucket-name.svc.edge.scw.cloud
. If you do not want to customize the standard Edge Services endpoint, you do not need to worry about CNAME records.
However, if you choose to customize your Edge Services endpoint with your own subdomain, a CNAME record must be created to point your subdomain to the Edge Services endpoint.
-
If your domain is managed with Scaleway Domains and DNS, we take care of auto-generating the appropriate CNAME record for you, as well as deleting it if and when you deactivate Edge Services. There is no action for you to take. You should not attempt to modify or delete the CNAME record (which will be visible among your Domains and DNS records in the console).
-
If your domain is managed by an external provider, Scaleway is unable to create the appropriate CNAME record for you. You will be prompted, as part of the process for customizing your Edge Services domain, to create this record yourself with your domain provider.
How to create a CNAME record
Log into your domain provider, and locate the DNS settings for your domain. Create a new CNAME record pointing your subdomain to the Edge Services endpoint for your bucket or Load Balancer origin. This endpoint can be retrieved from the Scaleway console.
The interface used by different domain providers varies, but creating your CNAME record may look like one of the following examples:
Record | Destination |
---|---|
my-chosen-subdomain.beautiful-domain.com | pipeline-id-or-bucket-name.svc.edge.scw.cloud. |
Subdomain | Target host |
---|---|
my-chosen-subdomain | pipeline-id-or-bucket-name.svc.edge.scw.cloud. |
Host record | Points to |
---|---|
my-chosen-subdomain | pipeline-id-or-bucket-name.svc.edge.scw.cloud. |
my-chosen-subdomain | Record Type | Value |
---|---|---|
@ | CNAME | is an alias of pipeline-id-or-bucket-name.svc.edge.scw.cloud. |
You may also see a TTL
field, which stands for Time To Live. This tells the DNS resolver how long it can cache this record, before it must re-check the origin source in case something has changed. TTL is measured in seconds, and the default value is usually 12 hours (43200 seconds) or 24 hours (86400 seconds).
Troubleshooting DNS and subdomain errors
When setting up your customized subdomain with Edge Services, you have the option to carry out a verification check on the CNAME record (if your domain is managed with an external provider). Edge Services will query the subdomain and check that it resolves correctly to the Edge Services endpoint. If there is a problem, you will see an error message:
An error message may also display at a later point from your Edge Services dashboard if a problem is detected at any point with your CNAME record or subdomain:
See the table below for help with troubleshooting these errors:
Error message | Solution |
---|---|
No CNAME record found | Make sure you have created a valid DNS record of type CNAME (not A, AAAA or another type), where your subdomain points to the Edge Services endpoint. |
Incorrect CNAME | Make sure your CNAME record points to the Edge Services endpoint in the format bucket-name.svc.edge.scw.cloud. , and that you have replaced pipeline-id-or-bucket-name with the name of your bucket in the case of an Object Storage origin, or the pipeline ID in the case of a Load Balancer origin. |
Domain does not exist | You must own the domain name you are attempting to configure. If you do not already own the domain name, you cannot create a subdomain or CNAME record for it. Register the domain name, for example using our Domains and DNS product, then create a CNAME record for the subdomain. Otherwise, ensure you did not make a typo when entering the domain name into the Scaleway console. |
scw.cloud is forbidden | You cannot use subdomains of the scw.cloud domain, as the domain is owned and managed by Scaleway and you cannot create DNS records for it. Use your own domain and subdomain. |
Invalid Top Level Domain | Make sure the Top-Level Domain (e.g. .com , .fr ) you entered is correct. |
Root domain not allowed | You cannot use a root domain alone to customize Edge Services (e.g. example.com . Make sure you use a subdomain (e.g. blog.example.com )) |
Subdomain must be a correctly-formatted, fully-qualified subdomain name | Make sure the subdomain name you entered is correctly formatted, e.g. foo.example.fr . |
Record already exists for this FQDN in your DNS zone | Choose a different subdomain, or delete the existing DNS record. |
Note that if your domain is managed by Scaleway Domains and DNS and you therefore have an auto-created CNAME record, you should not attempt to delete it or modify it in any way. Scaleway will take care of deleting the CNAME record if and when you deactivate Edge Services.