# Aliases

Aliases are a very easy way to hide parts of your URLs: They can be useful if your images come from different image repositories (for example: `https://static.mycompany.com/bucket/img`) and you do not wish these repositories to be publicly shown in your code. If you use only one repository for all your images, you can alternatively use [origin-url-prefix](https://docs.cloudimage.io/setup/shortening-urls/origin-url-prefix "mention").

With aliases, you can easily "mount" `src0` to `static.mycompany.com/bucket/img`*.*

## Step 1. Configure aliases <a href="#od_1e14582c" id="od_1e14582c"></a>

Log in to your Cloudimage admin console, navigate to *Image settings*, and scroll down to *Aliases*. Configure up to 10 aliases:

<figure><img src="https://727245914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIDIcmPiz7q6Sr6ZHHQxV%2Fuploads%2FH005zWOhBAnLVh8VRU6C%2Faliases.png?alt=media&#x26;token=ff979377-1766-4820-b63f-f91a6cb6f3bc" alt=""><figcaption></figcaption></figure>

All aliases have to be prefixed *and* suffixed by underscores. Make sure there are *no* leading or trailing slashes. Please note that all aliases have to be unique for your account - aliases set in the alias section cannot be used in the Storage sections (see [connecting-storage-bucket](https://docs.cloudimage.io/setup/connecting-storage-bucket "mention")).

Due to the specific way aliases are matched, it is required to use only specific aliases that are *not* contained in part of other alias strings.

Example: If you define an alias `_demo_one_` then you should not have:

* `_demo_`
* `_demo_one_two_`
* `_my_demo_one_`

As those would all be matched according to the first overlap (in this example, `_demo_`). An easy way to overcome this is by both prefixing and suffixing aliases with double underscores.

## Step 2. Construct your  Cloudimage URLs <a href="#od_ea102014" id="od_ea102014"></a>

**Without Alias**

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

**With Aliases**

[//**doc**.cloudimg.io/<mark style="color:red;">**\_sample\_/boat.jpg**</mark>?<mark style="color:orange;">**width=800**</mark>](https://doc.cloudimg.io/_sample_/boat.jpg?width=800&)

{% hint style="info" %}
The Aliases will interfere with your Cloudimage Library stored assets. In order to use this feature in conjunction with the Cloudimage Library, please contact our support.
{% endhint %}


---

# 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/shortening-urls/aliases.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.
