2

I have an app deployed in azure with a custom domain and it works fine if I use www.mydomain.org however with mydomain.org i am seing issues.

I'm using azure DNS to manage and after following this issue Azure Custom Domain (Namecheap) not working without www I have got it to work so I can reach my site without the www.

My issue comes that I am using the free app service managed certificates which i can apply to www. as it treats it as a subdomain but not without as thats considered a wildcard and going to my site without the www. shows a security warning Short of buying an expensive cert i'm not sure what else I can do.

Is there a way I can make all the traffic go via www. and thus use the valid certificate?

LiamHarries
  • 570
  • 1
  • 5
  • 20
  • Did you try to use URL Redirect in Namecheap - @ -> www.mydomain.org ? https://www.namecheap.com/support/knowledgebase/article.aspx/385/2237/how-to-redirect-a-url-for-a-domain/ – Andriy Bilous Jan 20 '21 at 13:36
  • Could you show what's the DNS records in Azure DNS? – Nancy Jan 21 '21 at 01:23
  • Here is the list of Azure DNS records. https://learn.microsoft.com/en-us/azure/dns/dns-zones-records Unfortunately there is no URL redirect option in Azure DNS, but you can vote for the feature https://feedback.azure.com/forums/217313-networking/suggestions/10109736-provide-a-301-permanent-redirect-service-for-ape – Andriy Bilous Jan 21 '21 at 08:43

1 Answers1

0

As the fastest solution, I would recommend you to use URL forward on Azure DNS or other provider level. Unfortunately at the moment Azure DNS does not have URL redirect option, but you can vote for the feature https://feedback.azure.com/d365community/idea/d8c8ab1c-8926-ec11-b6e6-000d3a4f0789?page=1

Solutions

  1. Move your domain to DNS provider that supports URL forwarding(HTTP 301)
  2. Create Azure Function with your own HTTP redirect(HTTP 301). https://www.peppercrew.nl/2018/04/create-a-web-301-redirect-service-with-microsoft-azure-functions/ or https://www.cazzulino.com/serverless-redirection.html
Andriy Bilous
  • 2,337
  • 1
  • 5
  • 16