Serve images from a custom domain

Every Sirv account is created with 2 subdomains, either of which can deliver your files:

  • youraccount.sirv.com – served direct from Sirv’s primary datacenter.
  • youraccount-cdn.sirv.com – served from Sirv’s fast global CDN.

Alternatively, you can personalize your URLs by using a subdomain of your domain, for example:

  • images.yourwebsite.com

Or something shorter:

  • i.yourwebsite.com

You might want to deliver other files from your Sirv CDN (not just images), so consider this subdomain:

  • cdn.yourwebsite.com

Or use a completely separate domain that you own:

  • anotherdomain.com

Provide your SSL certificate details

Before you configure your custom domain, get these items ready:

  1. SSL certificate
  2. SSL key
  3. SSL certificate chain

Send those items to the Sirv support team and they will configure your certificate in your account.

If you don’t already have an SSL certificate, it’s sufficient to purchase a DV (Domain Validation) single-domain SSL certificate. A single-domain SSL certificate can secure your Sirv subdomain (eg. cdn.yourwebsite.com) and also your www site (www.yourwebsite.com). There are many certificate providers, the Comodo PositiveSSL certificate is a cost-effective entry level certificate (from $5/year).

Configure your domain

To configure your domain, you must add a CNAME record.

1. Login to the control panel of your domain name provider.

2. Under the settings for your domain’s DNS records, find the option to edit the records.

3. Go to your Sirv Settings page and copy your unique custom domain location. It looks something like this:

abcdefghijklmnopqrstuvwxyz.sirv.netdna-cdn.com

3. Paste that unique custom domain into the control panel of your domain name provider as a CNAME record. The record also requires the domain name you want images to be served from e.g. cdn.yourwebsite.com.

4. Some domain name providers might require you to add the full CNAME record to the DNS. It will look like this:

cdn.yourwebsite.com. 300 IN CNAME abcdefghijklmnopqrstuvwxyz.sirv.netdna-cdn.com.

If you need assistance in configuring the CNAME, please contact your domain name provider, telling them the subdomain you wish to use and the unique Sirv CDN domain. You can also request guidance from the Sirv support team, from your account.

After you update your domain with Sirv, it typically takes about 30 minutes for DNS record changes to propagate across the web (though can take up to 24 hours).

Multiple domains

After your custom domain has been configured, any existing CDN URLs will no longer work. If you have published any live links to CDN URLs, you should update those.

  • CDN URL e.g. youraccount-cdn.sirv.com will stop working.
  • Custom domain e.g. cdn.yourdomain.com will start working.
  • Direct URL e.g. youraccount.sirv.com will work as normal.

Was this article helpful?