Configure a domain name on your Object Storage container
Find here how to configure a domain name on your Object Storage container
Find here how to configure a domain name on your Object Storage container
Last updated 27th October 2021
When you create a Public Storage Container, anyone can access your data. It is the ideal solution to share files over the Internet. However, you will need to provide a long URL to do so, which is hard to remember. If you want to use this content on your own website it may be simpler to use your own domain name. This means you can share your data with a customised URL that is easier to remember.
This guide shows you how to configure a domain on your container.
When OpenStack Object Storage receives an HTTP request, the "host" header is checked. If the host header differs from the current hostname, the system treats it as a mapped record and sends a DNS request for the full hostname. If a DNS entry is found, the container, the account and the object sought are extracted and the request is rewritten. Make sure that you client is using the correction "host" header, to enable the Object Storage to handle the request.
The feature works correctly with HTTP. However you will get a certificate error if you use HTTPS (as we don't have your private certificate). You can still use HTTPS, but you will get a warning in most browsers about the certificate.
You can only use one of these DNS records at a time:
Choose a subdomain (like "static.tuodominio.it"), add a CNAME record and then the destination.
To be interpreted by the Object Storage, the CNAME record must conform to some specific rules. Replace the [VARIABLE] in our example with the correct values:
[CONTAINER_NAME].auth-[PROJECT_ID].storage.[REGION].cloud.ovh.net.
For example, for a container named staticct and a project named 123xxxx456 to be used in SBG:
staticct.auth-123xxxx456.storage.sbg.cloud.ovh.net.
Your DNS record will be:
static IN CNAME staticct.auth-123xxxx456.storage.sbg.cloud.ovh.net.
Add a TXT record.
To be interpreted by the Object Storage, the TXT record must conform to specific rules.
'_swift-remap.' + subdomain
For example, if I want to use 'static.mypersonaldomain.ovh', I should use:
_swift-remap.static
As with the CNAME, replace [VARIABLES] to the correct value.
[CONTAINER_NAME].auth-[PROJECT_ID].storage.[REGION].cloud.ovh.net.
For example, for a container named staticct, in project 123xxxx456 used in SBG 1:
staticct.auth-123xxxx456.storage.sbg.cloud.ovh.net.
Your DNS record will be:
_swift-remap.static IN TXT staticct.auth-123xxxx456.storage.sbg.cloud.ovh.net.
If you do not want to use a subdomain, you can use the following command:
_swift-remap IN TXT staticct.auth-123xxxx456.storage.sbg.cloud.ovh.net.
Finally, the last step for configuring a TXT record is to add an A record for your (sub)domain which points to the Public Cloud Object Storage IP address. To do this, use the following commad:
dig storage.sbg.cloud.ovh.net
dig storage.gra.cloud.ovh.net
dig storage.bhs.cloud.ovh.net
You cannot use the following characters in your container name:
Please feel free to give any suggestions in order to improve this documentation.
Whether your feedback is about images, content, or structure, please share it, so that we can improve it together.
Your support requests will not be processed via this form. To do this, please use the "Create a ticket" form.
Thank you. Your feedback has been received.
Access your community space. Ask questions, search for information, post content, and interact with other OVHcloud Community members.
Discuss with the OVHcloud community