> For the complete documentation index, see [llms.txt](https://docs.ionos.com/cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ionos.com/cloud/~/revisions/AMiYziCllTKB2y2lmONY/network-services/cdn/dcd-how-tos/create-cdn-distribution.md).

# Create a CDN Distribution

A CDN distribution refers to the specific configurations that define how the content is delivered by the CDN to the users. You can create one or more CDN distributions under your contract as needed.

To create a CDN distribution, follow these steps:

{% hint style="info" %}
**Prerequisite:** Make sure you have the corresponding permissions to create and manage CDN distributions. Only contract administrators, owners, and users with **Access and manage CDN** privilege can create a CDN distribution. For more information, see [<mark style="color:blue;">Set User Privileges</mark>](/cloud/~/revisions/AMiYziCllTKB2y2lmONY/network-services/cdn/dcd-how-tos/set-user-privileges-cdn-dcd.md).
{% endhint %}

1\. In the **DCD**, go to **Menu** > **Network** > **CDN** under **Edge Networking**.

2\. Click **Create CDN distribution** from the **Distribution overview** page.

3\. Configure the following details for a CDN distribution:

* [<mark style="color:blue;">Define distribution properties</mark>](#define-distribution-properties)
* [<mark style="color:blue;">Define routing rules</mark>](#define-routing-rules)

4\. Click **Save** to apply the CDN distribution configurations.

![Create a CDN distribution](https://1737632334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MifAzdGvKLDTtvJP8sm%2Fuploads%2Fgit-blob-7f22be0db84e69705ab0e6471a25e2f8c08d7cb0%2Fcdn-create-cdn-distribution.png?alt=media)

{% hint style="success" %}
**Result:** The CDN distribution is successfully created. An IPv4 and IPv6 Anycast IP address is provided which is needed to configure your domain's [<mark style="color:blue;">Domain Name System (DNS)</mark>](https://docs.ionos.com/support/general-information/glossary-of-terms#domain-name-system-dns) settings to activate the CDN functionality.
{% endhint %}

{% hint style="info" %}
**Note:**

— If you are using IONOS [<mark style="color:blue;">Cloud DNS</mark>](/cloud/~/revisions/AMiYziCllTKB2y2lmONY/network-services/cloud-dns.md), follow the steps in [<mark style="color:blue;">Manage DNS Records of a Zone</mark>](/cloud/~/revisions/AMiYziCllTKB2y2lmONY/network-services/cloud-dns/dcd-how-tos/manage-dns-record.md).

— You can create a maximum of twenty CDN distributions, and each distribution can be configured with a maximum of twenty-five routing rules.
{% endhint %}

## Define distribution properties

To define the CDN distribution properties, enter the following details:

1\. **Domain:** Enter the origin domain, which is a URL that refers to the website address or content to access over the internet. You can use HTTP servers or Object Storage buckets as domains. For example, `www.example.com`.

2\. *(Optional)* **SSL Certificate:** Choose from the certificates already created via the **Certificate Manager**. You can also create a new certificate, which is then listed in the drop-down list here. To create one, follow the steps in [<mark style="color:blue;">Manage SSL Certificate</mark>](/cloud/~/revisions/AMiYziCllTKB2y2lmONY/network-services/certificate-manager/create-ssl-certificates.md). With a Secure Sockets Layer (SSL) certificate defined, the CDN distribution can serve content over HTTPS, the secure version of HTTP. To create auto-renewable SSL certificates based on a certificate provider like ACME, see [<mark style="color:blue;">Certificate Manager</mark>](/cloud/~/revisions/AMiYziCllTKB2y2lmONY/network-services/certificate-manager.md).

![CDN distribution properties](https://1737632334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MifAzdGvKLDTtvJP8sm%2Fuploads%2Fgit-blob-4950792fe90821fd0d9be52d3429cbeb8dddf341%2Fcdn-properties.png?alt=media)

## Define routing rules

To define the routing rules for a CDN distribution, enter the following details:

1\. **Prefix:** Enter a prefix that helps CDN determine the routing policies to apply for any URL path that begins with the prefix defined here. For example, if a prefix is defined as `/docs` under a routing rule, then all the URL requests that begin with `/docs` will be managed per the routing rules under which this prefix is defined.

2\. **Scheme:** Choose the type of transfer protocol to allow accessing resources from `HTTP/HTTPS`, `HTTPS`, or `HTTP` schemes. On choosing `HTTP/HTTPS`, the CDN directs `HTTP` requests `HTTP` and `HTTPS` requests to `HTTPS`.

{% hint style="info" %}
**Note:** Only the `HTTP` scheme is supported if **SSL Certificate** is not provided.
{% endhint %}

3\. **Host:** Enter the upstream host URL responsible for handling content requests and serving content to the users. This host is also responsible for fetching the content from the domain if data is not already cached at the edge server. For example, `server.example.com`.

4\. **Caching:** Turn on or turn off to choose whether or not to cache the responses from the upstream host. If turned on, the data responses are cached, and the user's request for the same content is served to the user next time from this cache memory.

5\. **WAF:** Turn on or turn off WAF to choose whether or not to protect the upstream host from malicious threats and vulnerabilities. For more information, see [<mark style="color:blue;">Web Application Firewall</mark>](/cloud/~/revisions/AMiYziCllTKB2y2lmONY/network-services/cdn/overview/web-application-firewall.md). When turned on, WAF incurs additional costs.

6\. **Rate Limit Class:** Choose from the drop-down list to limit the rate of incoming requests from specific IP addresses. The allowed rate limit class values are `R1`, `R5`, `R10`, `R25`, `R50`, `R100`, `R250`, and `R500`. For more information, see [<mark style="color:blue;">Rate Limit Class</mark>](/cloud/~/revisions/AMiYziCllTKB2y2lmONY/network-services/cdn/overview/features-benefits.md#rate-limit-class).

![CDN distribution routing rule](https://1737632334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MifAzdGvKLDTtvJP8sm%2Fuploads%2Fgit-blob-463be5beaa1d6d77271e210023419b0469cbc0d9%2Fcdn-routing-rules.png?alt=media)

7\. *(Optional)* **Geo Restrictions:** Click **Open country list** to turn on or turn off the countries to be blocked or allowed, then click **Save**. You can also enter the alphabet in the field provided to quickly jump to the country code in the list and choose to block or allow.

![Geo restrictions](https://1737632334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MifAzdGvKLDTtvJP8sm%2Fuploads%2Fgit-blob-2bdfa0d993737b3f3905e025beadf09c9a4c507b%2Fcdn-geo-restrictions.png?alt=media)

8\. Click **Add routing rule** to define another rule. Follow steps from step 1 to step 7 to add the routing rule and click **Save**. You can add up to twenty-five routing rules per CDN distribution.

![Create routing rule](https://1737632334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MifAzdGvKLDTtvJP8sm%2Fuploads%2Fgit-blob-dd813a3178e6f9edadc8fe0e391f6805114c507f%2Fcdn-add-routing-rules.png?alt=media)

9\. When more than one routing rule exists, use the drag-and-drop option to arrange them as needed. The routing rules' precedence applies in the order in which they are ordered.

{% hint style="warning" %}
**Warning:** It is recommended not to set the routing rule with the **Prefix** value `/` as the first routing rule since this will override all the subsequent routing rules defined in the distribution.
{% endhint %}

## Next steps

Configuring the DNS records for your domain completes the CDN distribution setup. For more information, see [<mark style="color:blue;">Manage DNS Records of a Zone</mark>](https://docs.ionos.com/cloud/network-services/cloud-dns/dcd-how-tos/manage-dns-record).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.ionos.com/cloud/~/revisions/AMiYziCllTKB2y2lmONY/network-services/cdn/dcd-how-tos/create-cdn-distribution.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
