Set Up a CDN Distribution with IONOS Cloud Object Storage as the origin
5 min
overview a content delivery network (cdn) is a network of distributed servers that can efficiently deliver web content to users across different geographic locations this tutorial demonstrates the use of the following components description cloud dns dns lets you publish domain name system (dns) https //docs ionos com/support/general information/glossary of terms#domain name system dns zones of your domains and subdomains on public name servers certificate manager certificate manager is a tool that simplifies the management of secure sockets layer or transport layer security (ssl or tls) certificates for websites and applications object storage object storage is fully compatible with s3, so you can manage buckets and objects with existing s3 clients when correctly configured cdn content delivery network target audience this tutorial is intended to help both developers and technical decision makers what you will learn in this tutorial, you will learn the process of setting up a cdn distribution for a domain using and the components mentioned in the overview docid\ ejvctd8yw5lgm5n5lthpo section this tutorial uses the example com domain for demonstration purposes before you begin to set up a cdn distribution using , it is mandatory to have a domain name example example com procedure create a zone to create a zone, follow these steps 1 in the dcd , go to menu > network services > cloud dns > public zones tab 2 select create primary dns zone and enter the following information component description example enabled/disabled your zone is by default enabled name your desired domain or subdomain test example com description a description of the zone my cdn distribution zone 3 click create zone the success message includes an option to copy the nameservers, which you can use to configure your domain at your registrar please note that dns changes may take up to 48 hours to propagate and be effective verify that your nameservers in your domain registrar are correctly pointing to ns ic ui dns com ns ic ui dns de ns ic ui dns org ns ic ui dns biz create an auto certificate note before creating an auto certificate, ensure you create acme provider https //docs ionos com/cloud/security/certificate manager/dcd how tos/create acme provider to create an auto certificate, follow these steps 1 in the dcd , go to menu > security > certificate manager 2 click create certificate and select auto certificate 3 enter the following information section component description example certificate provider provider your acme provider let's encrypt properties certificate name unique identifier for the certificate test example com common name common name for the certificate example com key algorithm rsa algorithm type rsa is used for secure public key encryption and digital signatures rsa3072 subject alternative names (optional) add up to 10 names for the certificate 4 click create to create the auto certificate set up a user owned bucket to set up a user owned bucket, follow these steps prerequisite you must have at least one active access key; otherwise, generate a key https //docs ionos com/cloud/backup and storage/ionos object storage/get started/generate key or activate https //docs ionos com/cloud/backup and storage/ionos object storage/how tos/manage keys#activate or deactivate a key an existing one 1 in the dcd , go to menu > storage & backup > ionos object storage 2 in the buckets tab, click create a bucket 3 choose the bucket region which determines the geographical location where the data inside the buckets will be stored 4 enter a unique bucket name that adheres to the naming conventions https //docs ionos com/cloud/backup and storage/ionos object storage/concepts/buckets#naming conventions for a bucket note the bucket name must match the fully qualified domain name example test example com 5 click create bucket note a bucket will not be created if a bucket with the same name already exists in the object storage 6 go to bucket settings > public access > static website hosting , specify your index and error documents and click enable 7 upload your website files to the bucket example index html or png info you can create a website using the ai model hub text generation https //docs ionos com/cloud/ai/ai model hub/how tos/text generation feature create a cdn distribution prerequisite ensure 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 set user privileges https //docs ionos com/cloud/network services/cdn/dcd how tos/set user privileges cdn dcd 1 in the dcd , go to menu > network services > cdn 2 click create cdn distribution from the distribution overview page 3 define distribution properties component description example domain enter your domain test example com ssl certificate enter the name of certificate you created using certificate manager example ssl certificate 4 define routing rules component description example prefix enter a prefix that helps the cdn determine the routing policies to apply for any url path starting with the specified prefix / scheme choose the transfer protocol type ( http/https , https , or http ) the cdn directs http requests to http and https requests to https http/https host enter the website host of the object storage s3 website eu south 2 example com caching turn on or off caching for responses from the upstream host when enabled, content is cached and reused for subsequent requests on waf turn on or off the web application firewall (waf) to protect the upstream host from threats and vulnerabilities on rate limit class choose a rate limit class from the following to control the rate of incoming requests from specific ip addresses r1 , r5 , r10 , r25 , r50 , r100 , r250 , r500 r10 sni mode ensure you use the origin mode, instead of distribution mode, while configuring object storage origin geo restrictions click open country list to turn on or off countries to be blocked or allowed, then click save you can also enter a letter to navigate to the country code and choose to block or allow allowed countries de , fr , es 5 click save to apply the cdn distribution configurations point zone records to cdn 1 in the dcd , go to menu > network services > cdn 2 in the distribution overview , select the created cdn distribution 3 in the details & edit cdn distribution , copy the following ip addresses needed to configure the domain's dns settings so that the cdn functionality can be active ipv4 address ipv6 address 4 create two new records in your dns zone pointing respectively to the ipv4 and ipv6 addresses enable dual stack connectivity to reach all global visitors, you must configure both a and aaaa records while an a record handles ipv4 traffic, an aaaa record is essential for residential and mobile users on ipv6 networks omitting the aaaa record may degrade performance or cause connectivity issues for a significant portion of modern internet traffic when configuring cloud dns for this tutorial, ensure you point the domain or subdomain a record to the ipv4 address the domain or subdomain aaaa record to the ipv6 address to create a record, follow these steps 1 in the dcd , go to menu > network services > cloud dns > public zones tab 2 select the appropriate zone in the dns zones column to create records alternatively, click details & records in the actions column 3 click create record in the details & records window 4 enter the following details in the create record window component description example enabled/disabled set the dns record to either enabled (default) or disabled enabled name enter a name for your dns record leave empty for an apex record use for a wildcard record test ttl set the time to live in seconds the default is 3600 seconds 60 type choose from available dns record types a content enter the content for the dns record, typically an ipv4 address or relevant data depending on the record type 192 0 2 1 5 click save to create the dns record expected result your dns record is now created to create a record, follow these steps 1 in the dcd , go to menu > network services > cloud dns > public zones tab 2 select the appropriate zone in the dns zones column to create records alternatively, click details & records in the actions column 3 click create record in the details & records window 4 enter the following details in the create record window component description example enabled/disabled set the dns record to either enabled (default) or disabled enabled name enter a name for your dns record leave empty for an apex record use for a wildcard record test ttl set the time to live in seconds the default is 3600 seconds 3600 type choose from available dns record types aaaa content enter the content for the dns record, typically an ipv6 address or relevant data depending on the record type 2001\ db8 85a3 8a2e 370 7334 5 click save to create the dns record expected result your dns record is now created validate the zone records verify that the a and aaaa records for your zone are correctly set up dig example com a the output should display the correct ip addresses for your zone final result now you can access the website https //test example com you can verify the benefits and performance of the configured cdn using any cdn performance testing tools conclusion in this tutorial, you have successfully set up a cdn distribution for your domain using your website should now be accessible via the cdn, and you can enjoy improved performance and availability
