# 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](/setup/shortening-urls/aliases.md) 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="/files/FMG27l5ACE0zRhKKHyv8" 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](/transformations/static-content.md). 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&)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cloudimage.io/setup/security/token-security/domain-whitelisting.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
