How to use the A Record option t create an apex domain

Dean Bullen 20 Reputation points
2024-07-22T13:51:51.75+00:00

It says in the docs: "for domain registrars that don't support ALIAS records, ANAME records or CNAME flattening, you can configure an A record for your static web app. This configuration directs traffic to a single regional host of your static web app. Using A records isn't recommended as your application no longer benefits from global distribution, and this type of setup could affect application performance if your traffic is globally distributed." (https://learn.microsoft.com/en-us/azure/static-web-apps/custom-domain)

I seem to be in this position, and my site isn't global so I should be ok, but I can't find any other info of how to do this? Presumably I need an IP address? Where can I find this?

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

Accepted answer
  1. SnehaAgrawal-MSFT 21,686 Reputation points
    2024-07-23T08:02:13.49+00:00

    @Dean Bullen Thanks for asking question!

    As its mentioned here- https://learn.microsoft.com/en-us/azure/static-web-apps/apex-domain-external#set-up-with-an-a-record

    1. Open the Azure portal.
    2. Go to your static web app.
    3. From the Overview window in the top right corner of the Essentials section, select JSON View.
    4. Copy the value of the stableInboundIP property and set it aside in a text editor for future use. This is the IP address of your regional Static Web Apps host.
    5. Under Settings, select Custom domains.
    6. Select + Add.
    7. In the Enter domain tab, enter your apex domain name. For instance, if your domain name is example.com, enter example.com into this box (without any subdomains).
    8. Select Next.
    9. In the Validate + Configure tab, enter the values.
    10. Select Generate code. Wait as the code is generated. It make take a minute or so to complete.
    11. Once the TXT record value is generated, copy (next to the generated value) the code to the clipboard.
    12. Select Close.
    13. Open a new browser tab and sign in to your domain registrar account.
    14. Go to your domain name's DNS configuration settings.
    15. Add a new TXT record with the following values.
      Setting Value
      Type TXT
      Host Enter @
      Value Paste the generated code value you copied from the Azure portal.
      TTL (if applicable) Leave as default value.
    16. Save changes to your DNS record.

    Check- Set up an A Record

    Hope this helps, please let us know if further query happy to assist.

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Dean Bullen 20 Reputation points
    2024-07-23T09:32:17.48+00:00

    Great thank you

    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.