All Collections
Integrations & Tech Setup
How to setup a Custom Snippet Domain?
How to setup a Custom Snippet Domain?

Setup a custom snippet domain to utilize the Ambassador snippet integrations.

Crystal McHenry avatar
Written by Crystal McHenry
Updated over a week ago

Overview

Follow the steps below to setup a custom domain for your company's use of the Ambassador Universal Snippet.

What is the Ambassador Universal Snippet?

Ambassador uses a web-embedded snippet to power the following features and functionality:

It is either embedded in the <head> of your website or is loaded from a tag manager such as GTM.

Start the domain process

Register a domain for use with the Ambassador Universal Snippet.

  1. Login to Ambassador via admin.getambassador.com.

  2. Click on the Domains tab.

  3. In the Custom Domains form, choose Snippet.

  4. Enter a domain name that matches the Top Level Domain of the intended host site.

    • For example, if you plan to put the universal snippet on example.com, you would choose something like snippet.example.com.

  5. Choose Add Domain to start the provisioning process.

  6. When you return to the Custom Domains page, you will see your new domain listed next to the Status "Pending hostname validation". This means that the domain is ready for configuration.

Hostname Validation

In this section, you will verify your ownership of the custom domain you configured in the first section, allowing Ambassador to serve the snippet through it.

These next steps may vary slightly depending on your hostname registrar. In this example, we will use Cloudflare DNS, but these steps will work with any provider.

  1. Click the checkbox next to the custom domain you configured in the first section and click View Domain.

  2. A Domain Details dialog will appear with information used to validate your domain.

  3. Create a CNAME record with your chosen subdomain:

  4. Create a TXT record for _cf-custom-hostname.<yourdomainhere> as indicated in Domain Details. The Content for the TXT record will be the Hostname verification value.

  5. After some time (typically 5 min - 12 hours), you will see the status of your custom domain change to Pending certificate validation.

  6. Once you receive this status message, you are ready for final steps.

Certificate Validation

Finally, to ensure your customers have the best experience, our custom domain name provider will issue a certificate against your custom host name. This will show that your snippet is being served securely on your website.

  1. Find the Certification verification name and Certification verification value on the Domain Details dialogue.

  2. Like in the section above, create a new TXT record. The Name will be the verification name and the Content will be the verification value.

  3. After the TLS certificate has been requested, the Status will change to Certificate requested.

  4. Once the certificate is provisioned, the status will change to Completed.

Tip: The time needed to validate the domain and certificate can range anywhere from 15 minutes to several hours. The automated checks happen less frequently over time.

Install or Update Snippet and Test

  1. Install or Update

    1. If this is your first time installing the universal snippet, then you can navigate back to the Editor to retrieve the Snippet code that is customized with your company's new custom domain.

    2. If you've already had the Universal Snippet installed on your website previously and need to update it, you simply need to find and replace any instance of cdn.getambassador.com on your website with the new custom snippet domain (example - snippet.example.com).

  2. Ensure that a custom domain is created for every top-level domain, and test your web pages and Ambassador features to ensure it's using the new snippet domain.

Did this answer your question?