How to Manage Custom Domain for Vultr CDN Pull Zones

Updated on November 27, 2024

Custom domain functionality in Vultr CDN Pull Zones allows you to serve your content using your own domain name, providing a branded experience and enhancing your site's credibility. By setting up a custom domain, you can ensure that your content is accessed through a personalized URL, which can improve user trust and engagement. This feature enables you to integrate your content delivery seamlessly with your existing domain infrastructure.

Follow this guide to configure a custom domain for Vultr CDN Pull Zones on your Vultr account using the Vultr Customer Portal or API.

  • Vultr Customer Portal
  • Vultr API
  1. Navigate to Products, click CDN, and then click Pull Zones.

    Pull Zone option in products sidebar

  2. Click your target CDN Pull Zones service.

    Selection of a target Pull Zone service

  3. Click Custom Domain.

    Access the custom domain window

  4. Provide the custom domain and certificate files if the origin URL uses HTTPS scheme.

    Add a custom domain with certificate files

  5. Click Update Custom Domain.

    Update Custom Domain Button

  1. Send a GET request to the List Pull Zones endpoint and note the target Pull Zone service's ID.

    console
    $ curl "https://api.vultr.com/v2/cdns/pull-zones" \
        -X GET \
        -H "Authorization: Bearer ${VULTR_API_KEY}"
    
  2. Send a PUT request to the Update Pull Zone to update the custom domain.

    Note
    The below API request uses http for origin-scheme, to use https as origin-scheme and vanity-domain together you will need to use ssl_cert and ssl_cert_key flags and provide certificate files.
    console
    $ curl "https://api.vultr.com/v2/cdns/pull-zones/<pullzone-id>" \
        -X PUT \
        -H "Authorization: Bearer ${VULTR_API_KEY}" \
        -H "Content-Type: application/json" \
        -d '{
            "vanity_domain": "<custom-vanity-domain>"
    }'