0

I have a domain (i.e. https://www.example.com). This domain points to content in an Azure Storage container. I have set up this container as a static website following these steps. Now, I need to add a subdomain (i.e. https://subdomain.example.com) that points to a separate Azure Storage container.

I thought I could do this by adding a CNAME record to my DNS that points to the container url. However, my domain provider will not let me use a URL that includes a path. I don't know if this is a DNS rule or something my domain provider does. Regardless, the Azure Storage container has a path (i.e. http://mystorageaccount.blob.core.windows.net/mycontainer). For this reason, I can't point a subdomain to an Azure Storage container via a CNAME record. My domain provider will only allow me to use (http://mystorageaccount.blob.core.windows.net) which clearly doesn't reference the container.

How do I point a subdomain to an Azure Storage container?

Thank you!

2
  • dont think it is possible, you could bind to your base container url and add URL rewrite rule to your server so / will redirect to /mycontainer Commented Nov 7, 2020 at 12:16
  • Not possible. @Yegor, since you commented first, can you answer the question? Link to the doc: learn.microsoft.com/en-us/azure/storage/blobs/… Commented Nov 7, 2020 at 12:35

1 Answer 1

1

According to the docs, the only available workflow now is to replace storage domain with custom domain, so you can't specify container there.

You could use url rewrite feature instead to redirect HTTP calls to specific route (in your case to your container).

Alternatively, take a look at Azure Storage static website hosting. It should allow defining custom "route entry" according to your logic

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.