# Domain whitelisting

As a reminder, a Cloudimage URL looks like this:

//<mark style="color:blue;">**token**</mark>.cloudimg.io/<mark style="color:red;">**original\_image\_url**</mark>?<mark style="color:orange;">**operations**</mark>&<mark style="color:green;">**filters**</mark>

By default, images from any origin domains can be resized by Cloudimage. The storage and traffic used by these images will count toward your plan’s allowance. In the Cloudimage admin console, you can restrict the list of origin server URLs your token can transform images from.

If you are using [aliases](https://docs.cloudimage.io/setup/shortening-urls/aliases "mention") and you have Domain whitelisting enabled, you have to include all aliases in the whitelisted domain list.

## Step 1. Configure domain whitelist <a href="#od_f59a4885" id="od_f59a4885"></a>

Log in to your [Cloudimage admin console](https://admin.cloudimage.io/project/settings/domains) and navigate to *Image settings* / tab *Domains*. Scroll down to *Whitelisted domains.* Then configure your original image domains / S3 buckets.

<figure><img src="https://727245914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIDIcmPiz7q6Sr6ZHHQxV%2Fuploads%2FtlAQnIQQMcbcuJ9HLU3n%2Fwhitelist.png?alt=media&#x26;token=58eade42-b192-4ca6-a799-9eeb676326f6" alt=""><figcaption></figcaption></figure>

Please note that when you whitelist eg. `sample.li`, this will also whitelist all its subdomains `sub1.sample.li`, `www.sample.li`, along with any recursive (sub...)sub.domain from the listed one.

{% hint style="warning" %}
When adding a domain to the whitelist, do not include `http://` or `https://`.
{% endhint %}

### **Whitelist and static content**

By default, Cloudimage does not enforce the domain whitelist when delivering[static-content](https://docs.cloudimage.io/transformations/static-content "mention"). If you would like to restrict delivering static content to whitelisted domains only, you can enable the *Honor whitelist when delivering static content* option in the Admin console.

## Step 2. Try it out! <a href="#od_126d9ac7" id="od_126d9ac7"></a>

This Cloudimage URL works (the sample.li domain is whitelisted):

[//**doc**.cloudimg.io/<mark style="color:red;">**http://samples.scaleflex.com/boat.jpg**</mark>?<mark style="color:orange;">**width=500**</mark>](https://doc.cloudimg.io/https://samples.scaleflex.com/boat.jpg?width=500&)

If the domain is not in your whitelisted domains list, the request will fail. In this example, `pbs.twimg.com` is not whitelisted, so the request is blocked.

[//**doc**.cloudimg.io/<mark style="color:red;">**pbs.twimg.com/profile\_images/839721704163155970/LI\_TRk1z\_400x400.jpg**</mark>?<mark style="color:orange;">**w=500**</mark>](https://doc.cloudimg.io/pbs.twimg.com/profile_images/839721704163155970/LI_TRk1z_400x400.jpg?w=500&)
