I added environment variables but still my website is not getting loaded

Tooba Nawaz 0 Reputation points
2025-07-28T07:41:59.3166667+00:00

I added some environment variables but my website is not getting loaded

https://lemon-stone-0a3e2d81e.1.azurestaticapps.net/

Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Vishvani Jilukara 5 Reputation points Microsoft External Staff Moderator
    2025-07-31T12:30:32.5033333+00:00

    Hii Tooba Nawaz,

    This may happen due to following reasons

    1. It looks like the environment variables you added to the Azure Portal aren't being injected into your frontend, which is why your static site still isn’t loading properly (even though the default domain is active).

    Client-side environment variables must be embedded at build time.
    If Using Local Build / Upload Manually- Add variables into .env.production or .env.local files.

    • If Using GitHub Actions / Azure CI (recommended)-Edit your workflow .yml to provide environment variables. 2.When you browse the web , the pages load slowly and sometimes time out.
      This problem is often caused by application-level issues, such as:
    • Network requests taking a long time
    • Application code or database queries being inefficient
    • Application using high memory/CPU
    • Application crashing due to an exception

    for your reference cross check, the process: https://learn.microsoft.com/en-us/troubleshoot/developer/webapps/iis/site-behavior-performance/slow-page-response-hangs#data-collectionYou can mark it 'Accept Answer' and 'Upvote' if this helped you

    Regards,

    Vishvani

    0 comments No comments

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.