Azure Blob Storage for static website with javascript http 401

Robin Tan 61 Reputation points
2023-06-04T18:55:51.2533333+00:00

Hi, I'm trying to upload a static website (sample javascript project from vite) to azure storage blob. It returns 401 when accessing the files.

I'm able to use the blob storage to serve other static websites like unity3d webgl fine. The vite sample, I tried uploading to netifly and it works there. Why does it not work on azure storage blob. There is no CORS needed to set on Netifly

User's image

Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
3,192 questions
0 comments No comments
{count} votes

Accepted answer
  1. KarishmaTiwari-MSFT 20,772 Reputation points Microsoft Employee Moderator
    2023-06-07T06:33:55.08+00:00

    @Robin Tan Thanks for posting your query on Microsoft Q&A.

    The URL blob.core.windows.net is not the correct url to access azure storage static website. The correct URL will end with web.core.windows.net.

    You can find more details about how to locate correct URL for your static website, by following this link - https://learn.microsoft.com/en-us/azure/storage/blobs/storage-blob-static-website-how-to?tabs=azure-portal#find-the-website-url

    Find the website URL on Azure Portal:
    In the pane that appears beside the account overview page of your storage account, select Static Website. The URL of your site appears in the Primary endpoint field.

    Azure Storage static websites metrics metric

    I hope this helps.


    If you have any questions at all, please let me know in the "comments" and I would be happy to help you. Comment is the fastest way of notifying the experts.

    Please don’t forget to Accept Answer and hit Yes for "was this answer helpful" wherever the information provided helps you. This can be beneficial to other community members for remediation for similar issues.

    User's image

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.