Point www to apex domain

Sam Uresin 85 Reputation points
2026-08-14T15:49:16.09+00:00

I use Azure DNS to manage my domain and the website is hosted on Azure Static Web App.

I like going with the apex domain as opposed to using the www and it's currently set up that way but every once in a while someone will inevitably add the www to the URL. How do I point the www to the apex domain?

So, I want https://www.example.com to point to https://example.com

There are a million examples for the opposite of what I want to do but I couldn't find any articles for pointing www to the apex domain and I'd appreciate some pointers here. Thanks!

Azure DNS
Azure DNS

An Azure service that enables hosting Domain Name System (DNS) domains in Azure.

0 comments No comments

Answer accepted by question author
TP 163.1K Reputation points Volunteer Moderator
2026-08-14T16:08:09.8366667+00:00

Hi Sam,

Assuming both apex and www are pointing to your Static Web App.

Please navigate to custom domains blade in your SWA, click on your apex, then click set default. Test to make sure www redirects to apex.

https://learn.microsoft.com/en-us/azure/static-web-apps/custom-domain-default

Thanks.

-TP

Was this answer helpful?

1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

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